0

Anybody please help me to know about return 0;

I know that return 0; is used to end the main function and to make the function to return a value .but am confused that why it forces to return "0"? but as output we are getting any values not only "0". then why return says to return 0;? sorry am new in CPP that's why having such doubts please help

18th Jan 2017, 5:21 PM
Slechu
Slechu - avatar
2 Answers
+ 1
return 0 means the states the program is successful returning any other number (generally 1) doesn't do that
18th Jan 2017, 6:38 PM
Chahat Gupta
Chahat Gupta - avatar
0
thank you
18th Jan 2017, 6:39 PM
Slechu
Slechu - avatar