Chapter 5: Problem 31
What is the purpose of the return statement in a function?
Short Answer
Expert verified
Answer: The return statement is used in a function to denote the end of the function and to specify the value or values that the function should return as output. It stops the execution of the function and sends the specified value(s) back to the calling point of the function, allowing the output to be used in further operations.