Computer Science, asked by savianand5568, 1 year ago

Which keyword can be used for coming out of recursion? a) break b) return c) exit d) Both break and return

Answers

Answered by pankajkumar17pm
15

break keyword is used for coming out from recursion

Answered by smartbrainz
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