4 ms·
That's a special case though and unrelated to (). Like it's also explicitly allowed to omit a return statement in main altogether, which implies a return 0.
by Vogtinator 7y ago
That's a special case though and unrelated to ().
Like it's also explicitly allowed to omit a return statement in main altogether, which implies a return 0.
- kazinator 7y agoThat was added in C99; previously, "falling off" the end of main without a return statement resulted in an indeterminate termination status. Countless sloppily written C programs had garbage termination statuses because of this, making it impossible for higher level programs (e.g. scripts) to reliably test for successful execution.