The problem is puts() always adds a newline after the string printed. It's used for printing simple, single-line, strings.
So, either:
- Concatenate the two strings "Disconnection from" and s into one and then puts() the new string. To concatenate the two strings use strncpy() and strncat().
- Use printf() instead of puts().