Discussion Forum : Array And Function
Question - What is the purpose of a return statement in a function?
Options:
A .  Returns the value and continues executing rest of the statements, if any
B .  Returns the value and stops the program
C .  Returns the value and stops executing the function
D .  Stops executing the function and returns the value
Answer: Option D
The return statement causes the function to stop executing and to return the value of its expression (if any) to the caller.

Was this answer helpful ?
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *