What type of initialization is needed for the segment “ptr[3] = ‘3’;” to work?
(a) char *ptr = “Hello!”;
(b) char ptr[] = “Hello!”;
(c) both char *ptr = “Hello!”; and char ptr[] = “Hello!”;
(d) none of the mentioned
This question was posed to me in examination.
The origin of the question is Character Pointers and Functions in portion Pointers and Arrays in C of C