I never saw such a while statement before.
while(printf(\"> \"), fgets(str, 100, stdin), !feof(stdin)) { .. .. }
I read
while(printf("> "), fgets(str, 100, stdin), !feof(stdin)) { .. .. }
Commas inside a while behaves more like this:
int feof_wrapper(FILE * stream) { printf("> "); fgets(str, 100, stream); return feof(stream); } while(!feof_wrapper(stdin)) { .. .. }