Answer

The printf function doesn't automatically put every message on a new line. You have to tell printf when it should move to the next line by putting the characters ``\n'' in the message to be printed.

So the preceding printf statement prints ``Hi there!'' on the current terminal line and then moves on to the next line. The next printf statement will output its message on that next line.

Return to lesson.



Eric N. Eide
Hamlet Project
Department of Computer Science
University of Utah