+ 9
return from main() is equivalent to exit the program terminates immediately execution with exit status set as the value passed to return or exit return in an inner function (not main) will terminate immediately the execution of the specific function returning the given result to the calling function. exit from anywhere on your code will terminate execution immediately. status 0 means the program succeeded. status different from 0 means the program exited due to error or anomaly. - Paolo and Mehmood Gaffar (Quora)
22nd Apr 2017, 1:44 PM
Agus Mei
Agus Mei - avatar