I am expecting that both following vectors have the same representation in RAM:
char a_var[] = \"XXX\\x00\";
char *p_var = \"XXX\";
But st
Arrays can be treated (generally) as pointers but that doesn't mean that they are always interchangeable. As the other said, your p_var points to a literal, something static that cannot be changed. It can point to something else (e.g. p_var = &a_var[0]) but you can't change the original value that you specified by quotes....
A similar problem is when you are define a variable as an array in one file, and then extern-use it as a pointer.
Regards