char s[]; for (i = 0; isspace(s[i]); i++) ;
Note: use of an empty body to the loop: the work is done within the for header.