First time playing with C strings and I have a simple problem. I am using fgets() to read from stdin: (fgets(input, 100, stdin)). Say I input the line 'firstline' so fgets will read 'firstline' into the input. Now I want to concatenate something else - say 'blah' (not from stdin) onto the input. The problem I am having is that the end of line character is forcing the concatenation onto the next line so i have:
What i want to have is:
What are some possible ways around this? Thanks.