Solved

Why Is the Following Method One Which Has Infinite Recursion

Question 17

Multiple Choice

Why is the following method one which has infinite recursion?
Public int infiniteRecursion(int n)
{
If (n > 0) return infiniteRecursion(n) + 1;
Else return 0;
}


A) Because there is no base case
B) Because the base case will never be True
C) Because the recursive call does not move the parameter closer to the base case
D) Because the recursive call moves the problem further away from the base case
E) None of the above, there is no infinite recursion in this method

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents