I am trying to understand pointers in C but I am currently confused with the following:
char *p = \"hello\"
This is a char pointer
For cases like this, the effect is the same: You end up passing the address of the first character in a string of characters.
The declarations are obviously not the same though.
The following sets aside memory for a string and also a character pointer, and then initializes the pointer to point to the first character in the string.
char *p = "hello";
While the following sets aside memory just for the string. So it can actually use less memory.
char p[10] = "hello";