Return Statement
Return Statement
return statement is used to transfer program’s control from called function to calling function, it’s secondary task is to carry value from called function to calling function.
If function’s return type is void, you can use return only to return program’s control to the calling function, and if there is a return type you will have to return same type of value to the calling function.
Syntax:
return;
Or
return (value)