0
What is the function of return in c++?
I still don't know why/for what it is used for.
1 Answer
0
Like C, the work of the return statement is same. It stops the execution of the function and returns to call the function. When return statement is executed, the function is immediately terminated at that point regardless of whether it's middle in a loop. It then returns the specified value to the userđ