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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -