What is this return 0? statement? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is this return 0? statement?

17th Jun 2016, 12:02 PM
sumit kachariya
sumit kachariya - avatar
8 Answers
+ 5
if you are talking about "int main()" function? we write "return 0;" as the return data type of the main function is "int", Had it been void,we won't need to write return 0.
18th Jun 2016, 6:26 AM
Tushar Purang
+ 4
it is terminating statement which mean operation complete
17th Jun 2016, 6:41 PM
ahsan
+ 2
return 0 is meaning this function completed
17th Jun 2016, 12:03 PM
Emre Özdil
+ 2
it is like (the end) quote after a movie ,it means the end of function
17th Jun 2016, 12:16 PM
mahmoud
0
simply, it's implies that the function value is satisfied totally and successfully.
21st Jun 2016, 1:46 PM
Akshay
0
it is used to terminate the main function
21st Jun 2016, 5:09 PM
Karthik Kevin
Karthik Kevin - avatar
0
terminating statement which means operation completed.
25th Jun 2016, 8:32 AM
Joyx Kish
Joyx Kish - avatar
0
Is "void" a valid return type for a Main()? Ex: static void Main{ //stuff }
28th Jul 2016, 8:33 PM
Matt Ferrie
Matt Ferrie - avatar