+ 1

What is the use of return

1st Jan 2018, 2:58 PM
Arjun Kapoor
4 Answers
+ 4
TheĀ return statement terminates the execution of a function. If a function has the return type void, this statement can be used without a value, otherwise it must return a value of the return type (like int) the function has
1st Jan 2018, 3:19 PM
Md. Nafis Ul Haque Shifat
Md. Nafis Ul Haque Shifat - avatar
+ 2
You just write "return" and what exactly has to return the function (if it returns something). but remember that after the "return" code is not executed
1st Jan 2018, 3:17 PM
Mykhailo Klimchuk
Mykhailo Klimchuk - avatar
+ 1
but you are already taking a specific language. in the python, for example, any type of return
1st Jan 2018, 3:22 PM
Mykhailo Klimchuk
Mykhailo Klimchuk - avatar
0
k thanks
1st Jan 2018, 3:18 PM
Arjun Kapoor