Strings

Q.

Which of the following statements are correct about the below declarations?
char *p = "Sanjay";
char a[] = "Sanjay";

1: There is no difference in the declarations and both serve the same purpose.

2: p is a non-const pointer pointing to a non-const string, whereas a is a const pointer pointing 

    to a non-const pointer.

3: The pointer p can be modified to point to another string, whereas the individual characters within 

   array a can be changed.

4: In both cases the '' will be added at the end of the string "Sanjay".

A. 1, 2
B. 2, 3, 4
C. 3, 4
D. 2, 3

Answer : Option B

Explanation :

No answer description available for this question.