- A string is a sequence of characters terminated by the null character.
- A sequence of one or more characters enclosed in double quotation marks.
- To hold the string’s terminating null character.
- As a sequence of ASCII values corresponding to the quoted characters, followed
by 0 (the ASCII code for the null character). - a. 97
b. 65
c. 57
d. 32
e. 206
f. 6 - a. I
b. a space
c. c
d. a
e. n
f. NUL
g.B - a. 9 bytes. (Actually, the variable is a pointer to a string, and the string requires
9 bytes of memory—8 for the string and 1 for the null terminator.)
b. 9 bytes
c. 1 byte
d. 20 bytes
e. 20 bytes - a. A
b. A string!
c. 0 (NULL)
d. This is beyond the end of the string, so it could have any value.
e.!
f. This contains the address of the first element of the string.
854 Appendix F
49 448201x-APP F 8/13/02 11:22 AM Page 854