0

What is the function of return in c++?

I still don't know why/for what it is used for.

27th Sep 2018, 9:45 PM
Artery
Artery - avatar
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😊
27th Sep 2018, 10:47 PM
Praveen Mohapatra