Question & Answer » GK Questions » Which keyword can be used for Coming out of Recursion

Which keyword can be used for Coming out of Recursion

Answer: Return is the keyword that is used for coming out of recursion. 

  1. Recursion is the program in computer science that calls the same algorithm repeatedly until the requirements get fulfilled. Although, it also calls the program’s functions several times to fill the output demand. 
  2. The break keyword is used for ending the break. We are talking about the coming out of the recursion program in this question. If we use break, the recursion program ends, and the compiler will not read the other program. 
  3. Exit is also used for coming out of the program, but it is not used globally. Often, exit comes from the specific function and algorithms, not from the whole program.