Now we're going to focus on the topic of arrays and how to initialize them, and especially how to deal with the concept of string. String is not a data type in C language, it's really a series of characters. So a string is really an array of char. We want to see how to initialize it because a lot of our interesting examples, including some on the homework, is to make use of working with strings. First, let's deal with the whole concept of array initialization. So we know that when we declare a simple variable, like here int ssn, we can after add the equal sign, which in this case is initialization, give it some appropriate constant value. But what happens when we declare an array? When we declare an array, we're actually declaring a bunch of variables, which are indexed. If we don't have an initializer again, becomes uninitialized, and some cases the system will decide to automatically give you a zero, but you can't necessarily rely on that. But now, if you want to give your arrays specific values, and here you'd have an int array which has five elements, don't forget this means data of zero, data of one, data of two, data of three, and data of four, then we can give an appropriate number of comma separated values in this kind of list, the curly brackets. So in this case, data of zero would be one, data of one would be two, data of four would be five. But also, we can abbreviate the lists. If we wanted all the elements to be zero, we could just list a single zero. We wouldn't have to list comma separating list of zero. It turns out that all of the elements will be initialized to this value. Also, we can have an array where we don't specify the size of the array. So we just say int data unspecified size initialized by one, two, three, and now the compiler says, "There are three values, so that means they wanted data, and this would have been equivalent to int data two." Now, data of zero is one, data of one is two, data of two is three. So depending on type, we would have such lists. So when doubles, we would have doubles. Now, what about the concept of string? Very, very useful. So we've already had strings. We've used so many things like printf and scanf. But strings are really what you might call concatenated together, sequentially next to each other characters chars. So this string, ab, denoted by the string constant with the double quotes, is really in its internal representation the character a, a char, typically placed in one byte. The character b, a char again, in one byte. What we're going to call the sentinel character, we're going to indicate that it's a zero. It can be also written as single quote backslash zero single quote. The reason for that is, if we have single quote zero single quote, we would not have a true zero. We'd instead have the ASCII value of the character zero. That isn't a zero. So in order to have a true zero, we have to escape the zero with this escape character, and then we get a true zero. So anytime you see a series of characters and the last byte being zero, that is an internal representation of an array. Let's look at something. Remember, we can also have an array, str, not give it a length equal, and we can do this quoted string. This is equivalent to having a series of inside curly braces, a series of characters. But look, there's a space there, I've drawn it, and a space there. So really, this is a character string that has, this is its first element, the letter a, a space is a second element, the letter b, a space is its fourth element, the letter c, and then implicitly, the sentinel character. So what's that going to mean? That's going to mean, as an internal representation, a space, b space, c zero, sentinel character zero. So that's really a six element char array that would really have been char str six. Keep in mind that the space, the single quoted space as in the ASCII table, if you look up the ASCII table value, it's 32. That's what would actually be stored in here, a binary representation of 32. So str of zero would have the a character, str of four would have the c character, and then the final element of the string array, str five would have the sentinel character zero. I call it a sentinel because when we do a lot of string processing, we generally put in a loop, and it searches for the end of string. So that's why we call it a sentinel or sometimes a guard. It's a way to find the end of a string. So this has six elements. Now, we're going to go on to understanding more sophisticated ways of indexing and looping over arrays.