Udemy - Advanced c programming pointers - Addresses and Indirection What is the relationship between a pointer and an array (or string)? Transcription : Arrays in C are actually just sequential data items stored at some location in memory the address of the array is the same as the address of the first item in the array because it is where the array begins. The name of the array that is the name you get to the array variable is also the address of the array. To explain this let's look at how strings are used in C unlike many other languages. C does not have a dedicated string data type in C A string is just an array of characters for convenience C treats the null character Slash's zero as the string Terminator. When you declare a string variable like this C automatically ODs a null char at the end. Now let's see if we can find where this string is stored in memory. Now here's my program and here you can see that I've just created a string hello world whi...
Udemy - Advanced c programming pointers - Addresses and Indirection What is the relationship between a pointer and an array (or string)? Transcription : Arrays in C are actually just sequential data items stored at some location in memory the address of the array is the same as the address of the first item in the array because it is where the array begins. The name of the array that is the name you get to the array variable is also the address of the array. To explain this let's look at how strings are used in C unlike many other languages. C does not have a dedicated string data type in C A string is just an array of characters for convenience C treats the null character Slash's zero as the string Terminator. When you declare a string variable like this C automatically ODs a null char at the end. Now let's see if we can find where this string is stored in memory. Now here's my program and here you can see that I've just created a string hello world whi...