logoalt Hacker News

drdexebtjlyesterday at 8:23 PM1 replyview on HN

C on the other hand puts an implicit `return 0` at the end, but only on the main function for some reason. Very weird.


Replies

mpyneyesterday at 10:55 PM

C++ also special-cases the `main` function. Probably because `main` is the interface to the OS so it gets special language treatment.

show 1 reply