1.

Should A Function Contain A Return Statement If It Does Not Return A Value?

Answer»

In C, VOID functions does not return anything. So it is useless to put a return statement at the end of the function, where the control will any way return to the caller function. But, if you WANT to omit some PORTION of the function depending upon the SCENARIO, then this return statement is PERFECT to avoid further execution of that void function.

In C, void functions does not return anything. So it is useless to put a return statement at the end of the function, where the control will any way return to the caller function. But, if you want to omit some portion of the function depending upon the scenario, then this return statement is perfect to avoid further execution of that void function.



Discussion

No Comment Found