+ 2

What does return do in functions?

Is return in this example like cout

4th Jul 2019, 11:15 PM
Faisal Alghamdi
Faisal Alghamdi - avatar
5 Answers
+ 3
return gives back a value or nothing/void to the calling process and returns the program flow/counter back to the point just after where the function was called. cout in C++ outputs something to standard out/console.
5th Jul 2019, 2:20 AM
Sonic
Sonic - avatar
+ 2
You forgot something
5th Jul 2019, 12:04 AM
Lexfuturorum
Lexfuturorum - avatar
+ 2
I believe you are right
5th Jul 2019, 1:55 AM
Faisal Alghamdi
Faisal Alghamdi - avatar
+ 1
Thanks sonic by the way you are my kid's favourite cartoon 😂
6th Jul 2019, 12:27 AM
Faisal Alghamdi
Faisal Alghamdi - avatar
+ 1
Thanks lex ?????
6th Jul 2019, 12:28 AM
Faisal Alghamdi
Faisal Alghamdi - avatar