"return 0" in the function (not end of function)

Nov 16, 2013 at 11:26am
Hello!
Please, if we put "return 0" somewhere in the function (not main) where it is NOT the end of the function, will the result be finishing of the function on that place, no matter what happens later (if()..retorn 0)?

Many thanks!
Nov 16, 2013 at 11:34am
Yes, if your function returns a value, it'll return the first return statement it encounters(keeping in mind flow of control, etc.).
Topic archived. No new replies allowed.