Previous: 8.3 Direct I/O with Files
Up: 8 Functions and Files
Next: 8.5 Summary
Previous Page: 8.3.2 Formatted I/O
Next Page: 8.5 Summary
scanf("%s", msg);
Input: this is a string
With the above input, scanf() will read "this", and NOT the whole string, into
memory pointed to by msg. However, printf()
will print the entire string until
the terminating NULL.