#include int main(){ char *c = "test"; while(*c!=\'\\0\'){ printf("%c", *c); *c++; // or c++ both produced same result.