29 ms·
<< Edited out for being unnecessarily combative >>
by deaddodo 3y ago
<< Edited out for being unnecessarily combative >>
- jandrese 3y agoWe might be saying the same thing here, but modern C scopes variables down to the block. So if you have a variable declared for instance inside of a for loop or if statement, that variable is out of scope once you exit the block. This will fail to compile with an "undeclared identifier" error: if ( x > 0 ) { int y = 1; } printf("%d", y); It is a feature that was long overdue in C IMHO.