0

What is the function of return?

I always see return 0, but I have never know the specific function of it.

25th Sep 2016, 2:28 AM
Giovanni
2 Answers
+ 1
pass a value to the caller.
25th Sep 2016, 2:28 AM
kiwiyou
kiwiyou - avatar
+ 1
INT MAIN is a function. Functions are called by other functions to do something, and at the end they give an output. In this case, the output is "0", that means that everything went well in the program.
25th Sep 2016, 7:52 AM
marcram