c - How does this loop end? -


code example this:

#include<stdio.h> void main() {     char *s={"abcd"};     {         printf("%d\n",++s);     } while(*s); }   

where pointer s point when loop ends?how work?

in c, 0 equivalent false. when *s points terminator character in string (a zero), loop stops.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -