As the heading says, What is the difference between
char a[] = ?string?; and char *p = ?string?;
This question was asked to me in inter
char a[] = "string";
This allocates the string on the stack.
char *p = "string";
This creates a pointer on the stack that points to the literal in the data segment of the process.
? is whoever wrote it not knowing what they were doing.
?