0
What's the use and importance of the return statement?
3 Answers
+ 1
a return statement returns a value that has been processed or is true ,
its just like a way of returning our final result after the process is completed !!!
#SiD
0
Return Statement is Very Usefull, when u create a function and return something from the function , at the time of calling the function u can access that returned variable.
Example :-
void sum()
{
int a=5;
int b=6;
int sum=a+b;
return sum;
}
int value = sum();
in this case the int variable value will become equals to a+b which is equals to 11