Page 1 of 1

What type of initialization is needed for the segment “ptr[3] = ‘3’;” to work?

Posted: Wed Jul 13, 2022 7:54 pm
by answerhappygod
a) char *ptr = “Hello!”;
b) char ptr[] = “Hello!”;
c) both char *ptr = “Hello!”; and char ptr[] = “Hello!”;
d) none of the mentioned