int main(void) { char *q = "less fried food, more aerobic exercise"; char *p = q; while (*p) if (*p++ == ' ') { printf("%d\n",p - q); q = p; } }