0

why we use return in this prog. #include <iostream> using namespace std; int timesTwo(int x) { return x*2; } in

16th Sep 2016, 7:45 AM
Mayur Patil
Mayur Patil - avatar
1 Answer
+ 1
The function parameters here are passed by value. If you don't use return, your function won't do anything.
16th Sep 2016, 8:47 AM
Zen
Zen - avatar