if a function has no return type (it is missing or not mentioned) and return statement is used in it what will be the use of return statement.
ans fast plzz....
Answers
Answered by
0
to return the values to the main
Answered by
1
The return statement will be uused to terminate the method.
Basically a method's function is to compute and return a value.
But if we want to use it for some other purpose , we have to specify its return type as void.
the return type cannot be missing . There has to be a return type.
I hope it's clear now.
Thank u ★ ★ ★
#ckc
Basically a method's function is to compute and return a value.
But if we want to use it for some other purpose , we have to specify its return type as void.
the return type cannot be missing . There has to be a return type.
I hope it's clear now.
Thank u ★ ★ ★
#ckc
Similar questions