2 ms·
This is worse, in most cases as you normally want to do something to c after you have read it, forcing you to re-check the condition int c; //a char can't
by noselasd 9y ago
This is worse, in most cases as you normally want to do something to c after you have read it, forcing you to re-check the condition
int c; //a char can't represent EOF
do {
c = getchar();
if (c != EOF) {
//do stuff
}
} while (c != EOF);