0
Why do we need to return function's value??
3 Answers
+ 11
Functions return a value (except for functions declared with "void" keyword), the "return" allows you to close the function and return the value.
More informations -
https://stackoverflow.com/questions/16706813/when-return-is-needed-and-not-needed-in-c
Similar threads -
https://www.sololearn.com/Discuss/55719/?ref=app
https://www.sololearn.com/Discuss/239950/?ref=app
+ 4
because we need some value from calculation done in function.
let say function Velocity where it take two integer as argument (space and time) and return double ( because many velocity is in decimal number). Thus the function Velocity return double.
0
Try to make some programs to solve specific problems and you will realize why returning a value is important and beneficial



