Name of arrays are constant pointers

"I am currently a Software Engineering student at ALX. I'm passionate about technology and enjoy conducting research to find answers on my own. I have a natural inclination to ask 'WHY' more often than 'HOW'.
"While working on projects at ALX, I have acquired a wealth of interesting and diverse knowledge about software engineering and computer science in general. Therefore, I needed a place to store and save all this information, allowing me to refer back to it whenever I forget."
imagine I tried this and got an error
can you do this in c?
int a[] = {1, 2, 3, 4, 5};
a = a + 2;
No, you cannot do that in C.
The name of an array in C represents the address of its first element, and this address cannot be changed once the array has been declared. Therefore, the statement "a = a + 2;" is invalid in C.
If you want to access the third element of the array "a", you can use the subscript operator [] as follows:
int a[] = {1, 2, 3, 4, 5};
int *ptr = &a[0]; // Get the address of the first element of the array
ptr = ptr + 2; // Move the pointer two elements ahead which is 3
int third_element = *ptr; // Access the third element of the array



