Hello guys.
So we're now going to discuss the difference between character pointers and character arrays so follow
my lead.
This is a character pointer and essentially this data is stored in the data section of the executable
when it compiles.
There's a few sections that's a tech section where the code is stored.
There's a data section where data is stored and there's some other sections as well which are a read
a relevant for this lecture.
So when I do these quotes and do hello world.
This is stored elsewhere.
And this is replaced a compile time with an address.
So we basically point to the address of whatever hello world is when it's compiled.
Now the char arrays are a little different.
If we do char ABC 2 equals Hello World.
Now this here is stored on the stack or in the CPE registers.
When we actually run this code.
So the difference here is this isn't this isn't returning a pointer of any kind.
This is instead treated as an array and it's stored on the stack or in the individual registers of the
CPI price of the CPI.
So that is the difference.
I hope that makes sense.
So essentially ABC is a point.
But ABC 2 is not.
If you try to assign ABC 2 to ABC so that it points to this it would not work because ABC 2 is an array
whereas ABC is a point to.