+ 1

What does returning do???

I dunno wot it means

23rd Aug 2017, 6:37 AM
aiden
3 Answers
+ 1
it return values from sub function to main function in cpp
23rd Aug 2017, 7:30 AM
Million Gashawbeza
Million Gashawbeza - avatar
0
Here's a quick example: def add(a, b): return (a + b) x = add(3, 4) When the function returns the sum of a and b, which is 7, the number 7 will be stored in x.
23rd Aug 2017, 6:41 AM
DaemonThread
DaemonThread - avatar
0
Thanks 😀
23rd Aug 2017, 9:35 PM
aiden