Skip to main content

Posts

Showing posts with the label return statement

Return Statement in C programming

                It is the statement that is executed just before the function completes its job and control is transferred back to the calling function. The return statement serves mainly two purposes. They are: 1)       It immediately transfers the control back to the calling program after executing the return statement. 2)       It returns the value present in the parentheses to the calling function.          The syntax for return is :                      return expression;      Here, the value of expression is returned to the calling portion of the program. The expression is optional. If the expression is omitted, the return statement simply causes the control to revert back to the calling portion of the program without any ...