int main(){
char s[]="hi ";
char t[55];
fgets(t,55,stdin);
strcat(s,t);
puts(s);
}
I want to concatenate the strings s
and the entered string t
, but I'm not getting any output. I have tried using gets
to read the string
but the compiler says "use of gets can be dangerous". What should I do?