For loop a char array using pointer
#include <stdio.h> int main(void) { char str[] = "Pointers are fun and hard"; char *p; int i; p = str; /* loop until null is found */ for(i = 0; p[ i ]; i++) printf("%c", p[ i ]); return 0; }