What type of initialization is needed for the segment “ptr[3] = ‘3’;” to work?
Posted: Wed Jul 13, 2022 7:54 pm
a) char *ptr = “Hello!”;
b) char ptr[] = “Hello!”;
c) both char *ptr = “Hello!”; and char ptr[] = “Hello!”;
d) none of the mentioned
b) char ptr[] = “Hello!”;
c) both char *ptr = “Hello!”; and char ptr[] = “Hello!”;
d) none of the mentioned