Which keyword can be used for coming out of recursion? a) break b) return c) exit d) Both break and return
Answers
Answered by
15
break keyword is used for coming out from recursion
Answered by
8
The Answer is b) return
Explanation:
The break statement used to end the program loop immediately when encountered. The break keyword causes an immediate exit from the "switch" or loop statements (“for, while or do”).
The keyword used for coming out of recursion is "return". The return keyword is used to stop the execution of a function and transfer the control of the program back to the calling function.
The keyword void exit () ends the process or function immediately.
Similar questions
Math,
7 months ago
Geography,
7 months ago
Computer Science,
1 year ago
Biology,
1 year ago
Science,
1 year ago