FRESHSALES REVIEW

WHAT IS THE WORK OF RETURN STATEMENTS IN FUNCTION?

 WHAT IS THE WORK OF RETURN STATEMENTS IN FUNCTION?


We use return statements in function many time. Return statement is used to declare the end of the function. The codes after the return statement will not be executed. Suppose you have written return 2+2 and if you print the function by using consoles, echo, printf(), print() or cout you'll get only 4. That's how return statement in function works in every programming.