The return
statement used in a function:
- ends the function execution
- continuously repeats the function execution
- repeats the function execution once, and then ends the function execution
Explanation & Hints:
The return statement used in a function ends the function execution. When a return statement is encountered, the execution of the current function is stopped, and control is returned to the point where the function was called. Additionally, the return statement can be used to send a value back to the caller. This is fundamental in many programming languages, including C, C++, Java, and Python, among others. Thus, the correct understanding of a return statement is that it terminates the function’s execution. |