I've searched to find an answer to my specific question but could not find one that matched. I understand that return 0
and return EXIT_SUCCESS
essentially do the same thing of saying that the program ended successfully, but what if you do return 1
or return 2
or any other int value for that matter? Do different int values mean different things to the compiler or is returning any int simply mean that the program terminated successfully, in which case it doesn't matter what int value you put in? To my (limited) knowledge, it seems that int main()
just needs to return any int in order to terminate. Am I wrong?
Thanks and I apologize if this was asked before, I just wasn't able to find it.