0

What's the use and importance of the return statement?

8th Jan 2017, 9:10 PM
Tanishka Prasad
Tanishka Prasad - avatar
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
8th Jan 2017, 9:33 PM
Siddharth Naithani
Siddharth Naithani - avatar
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
8th Jan 2017, 9:36 PM
Vivek Bora
Vivek Bora - avatar