Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Both versions are supposed to return an int but neither has a return statement. Is that not an error?


The main function returns zero implicitly if control flow reaches the end without encountering a return statement.


It wouldn't be C++ without undefined behaviour.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: