Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Usage of return value in C language
Usage of return value in C language
In a function, if you encounter a return statement, the program will return to the next statement that calls the function to execute, that is, jump out of the execution of the function and return to the original place to continue execution. However, if the return statement is encountered in the main function, the whole program will stop and exit the execution of the program.

The return value of the function is realized by the return statement return, and the final operation of the function is return. What is the significance of the return?

(1) The subroutine function returns to the main function, announcing the end of one-time execution of the function, and canceling the variable unit allocated when calling;

(2) Send the function value to the calling expression. Of course, this is not necessary, because some functions have return values and some functions have no return values.

Extended data:

The meaning of return as an English word in C language;

Return, an English word, verb, noun and adjective, means "return" when used as a verb; Restore (especially feelings); Return ...; Repay with ...; (Tennis, etc.) Return (ball) ",when used as a noun, means" Return; Reduction; Return; Return the ball (in tennis, etc); Things are back; "Ring conductor", when used as an adjective, means "back and forth; Tour performance; Repayment; Return trip; It has been returned. "

Baidu encyclopedia-regression

Baidu encyclopedia-regression