0
How the pointer holds a string in one address ? char *s = "hello"; char *p = s; printf( "%c" , s[0]); ANSWER = h
Pointers
2 Antworten
+ 5
The string is not held in one memory address, instead the pointer only holds the address to the 1st character of the string. Try running this
char *s = "hello";
printf("%c", *s);
It will output only the first char, meaning `s` is the address to only the first characer of the string
+ 1
Thank you very much