+ 2

Why should the compiler return 0?

Why should we use 'return 0;'statement at the end of our program?

3rd Sep 2016, 1:11 AM
Arcot Prashanth
Arcot Prashanth - avatar
1 ответ
+ 3
Please scroll back down to the 3 other times this question has been asked today. Return 0 from main indicates that the program has successfuly exited, 0 indicating no errors, and other values such 1 indicate the program has exit with errors. Credit to Zen for answering this 3 times today, haha.
3rd Sep 2016, 1:52 AM
Cohen Creber
Cohen Creber - avatar