Difference between char [] and char * in C?
The first statement puts the literal string “mycplus” in read-only memory and copies the string to newly allocated memory on the stack. The second statement is known as static string allocation and definition. This statement places the string “mycplus” in the read-only parts of the memory and making p_name a pointer to that string.