Computer Science, asked by nitisingla999, 10 months ago

is it compulsory to have one return statement in function​

Answers

Answered by SHIVAMBANDE18122005
1

Explanation:

It is never mandatory. If the function does not return a value, you need not use a return statement and can just let the function go on to the closing “ } ”. If however the function does return a value ( void is not a value), you ought to use a return statement to set up the value to return

Similar questions