Okay. Now, we want to get into the weeds. This is a difficult to picture set of ideas. Exactly how is an array stored in memory? What we have to understand is an array has a place where it's stored and it starts at what's called its base address. That's because we want a bunch of elements. So we have to have a place to start, and then it runs contiguously through as much memory as is needed. That gets allocated automatically in this case by the compiler. So there's some things we don't know explicitly because the compiler is doing it for us. The array has a very strong relationship with another data type called a pointer. So we're going to start to explore the connection between array address and pointer. Now, a simple data type like an integer, when we say integer a inside a block, it means create a variable in memory. The memory needs to be as many bytes as to store appropriately the values that are allowed for an integer. So an integer on most computers now is stored in four bytes. Four bytes to 32 bits, and if we say something like a is assigned three, then what that means is in these four bytes we put inappropriate representation binary three and it's going to be in some location in memory. Remember, nowadays computer memory involves gigabytes. That's billions of individually addressable cells. So each of the cells in your computer memory has a location which is basically a number. So for just the sake of having some concrete thing to think about, let's say this is location 7,006 and we stored three there in this four-byte set of memory cells. So when we think of a variable, we think of its name. That's how we use it in the code but we think it has a location and memory, and inside that location is some stored value interpreted as an integer. Way to think about this is think of these things as imagine a whole bunch of a billion and big computers that could be hundreds of billions of mailboxes, and in the mailboxes, there are specific kinds of values; integers, long integers, doubles and chars. So that's what we're going to store. We have a mailbox. It has an address, that's a number, and then inside there's something which is represented as a binary set of digits and interpreted as a particular data-type. Now, when we go over to an array as opposed to a simple variable, let's say we have the array data. Four is the integer again and we're going to store. Remember we just talked about how we can initialize it. So this represents instead of a single variable, four integer variables. They start again, if we view the compiler as having assigned them to the mailbox 7,006, well, two is put it in the mailbox 7,006, four bytes later at 7,010 we put in four, four bytes later in 7,014 we put six and four bytes later and 7,018 we put in eight. So we think of this array as having four individual cells and mailboxes appropriate to that integer data-type, meaning we need four bytes. We can think of this as data of zero, one and two. There's specifically data of three. If you want to know how that address calculation happened, the address is equal to the base address plus two times the length of the four byte integers. So if the base address with 7,006 and we need to be over here, well, that's two times four which is eight. So it's going to be 2,014. That's an address calculation. So an address calculation for an array in C, base address plus the offset, the index times the size required, the size in bytes required to store that individual datatype. That's what we mean by address arithmetic, and as I say, if these are unfamiliar notions, they do take getting used. So it's something that you don't need to worry about if you didn't get it. Some of you may not even need it. You certainly need it if you want to go on and do more computer science work. But if you just want to be a simple programmer, it may be enough to just understand that indexing works for you. But really to get to the next level, you want to really understand the notion of address. Now, there are special variables called pointer variables. They are a derived type, and a type is expressed and follows. You say what the basic type is, in this case it's an integer, then you use the special star character, the asterisk, and then the variable name. So frequently we'll use P for pointer, PTR, and here we're declaring a variable that can point at something that can store integers but isn't backed an address. So let's say a was an integer variable, a pure integer variable. This is initialization, and we're saying here initialize this pointer to where a is stored, the address in memory where a is stored. Again, if you think back to my previous example, that would end up being 7,006. It's something we don't have to know. The piler is going to decide on it. The compiler could decide differently at different times in the compilation. So it's not something we worry about. But we have to understand that this is getting the address of this variable, and that address is being stored in P. So we can now think of P it's this value 7,006. What's stored in that memory is an integer variable whose value is three, namely that was what we were thinking of as a. Now, we can have as an expression P or *P, and those are two different variable. If we tried to print the value of P, we would get some address. If we were to dereference it, star is a dereferencing. If we were to dereference P, the value there would be the integer value three. All right. All of that is fairly theoretical, a little hard to get your hands on if you haven't seen these ideas before because you're really thinking at a machine level. You're thinking what the compiler does for you. But we're going to go ahead. In the next segment, we're going to write some code that will actually show what these values are. We're going to try to understand it by testing our concept by actually writing code that prints an address that prints what's stored at the address and show that distinction in actual C code.