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.
The pointer is a variable which holds the memory address of another variable. If one variable contains the address of another variable, the first variable is said to point to the second. There are two types of pointer operators; * and &. the & is a unary operator that returns the memory address of its operand.