
Strings
Strings are any quoted series of characters such as:
"Hello, World!"
Character strings are a special case of array. Specifically, a string is an array of characters (termi-
nated with an invisible null character, which is notated \0).
The string in Table 15.7, my_string, is an array with 14 elements.The 14
th
element, which we
access from my_string[13], is the null character. It’s an important part of the string we must not forget,
even though we never see it!
Table 15.7 Character Strings as Arrays
String my_string
0123456 78910111213
Hello,space Wo r l d ! \0
As with any other array, a character string can be declared either with a pointer or with ...