My code looks some like below
printf("string:");
fgets(s,58,stdin);
prinf("xyz %s abc", s);
The problem I face is the "abc" goes to the next line
E.g. string is kkkk
Then output is
xyz kkkk
abc
like even the space goes in the next line so how to fix this so all xyz string and abc are in same line?
I want to do this using fgets not scanf.