We saw earlier in this chapter that we can use the character (char) type to store a single character; however, what if we wanted to store whole words or sentences? We can use an array of characters to do this. Character arrays can be initiated exactly like other arrays as the following code shows:
char myStr[10]; char myStr[8] = {'A', 'r', 'd', 'u', 'i', 'n', 'o', '\0'};
Generally, character arrays are called strings. In the preceding code, we define an uninitialized string that can contain up to ten characters and also a character array that contains the word Arduino.
You may notice that at the end of the Arduino string there is a \0 character. This character represents a null. When defining a string we should always terminate the string with the null character, this is called...