The while
, if
, else if
, and else
are followed by a single statement. This statement can be an actual line of C, or a block statement (surrounded by braces). The if
, else if
, and else
are considered as one block.
So using braces, this would be the equivalent:
while((c = getchar())) != EOF) {
if (c >= '0' && c <= '9') {
++ndigit[c-'0'];
}
else if() { /*and so forth...*/
++nwhite;
}
else {
++nother;
}
}