String ImageMap
A string is an array of characters, that has the Null Character at
the end. The Null Character, '\0', is a special character which serves as
a kind of marker. It marks the end of the array. The %s Format Character
is used with strings, in both printf
statements and scanf
statements. The imagemap below shows two methods of inititalizing strings,
both resulting in the Null Character being added after the other characters.
Click on any text or a portion of the diagram to find explanatory information:
VIEW
STRINGS ANIMATION
RETURN TO C
TUTORIAL TOPICS
Last Revision: May 8, 1999
Author: Lee
Tauck