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

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -