Multiple Choice
How many times will the following function call itself if 5 is passed as the argument?
Void showMessage(int n)
{
If (n > 0)
{
Cout << "Good day!" << endl;
ShowMessage(n - 1) ;
}
}
A) 1
B) 4
C) 5
D) An infinite number of times
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q13: The following code is an example
Q14: Any algorithm that can be coded with
Q15: All mathematical problems are designed to be
Q16: Indirect recursion means that a function calls
Q17: Recursive algorithms are less efficient than iterative
Q18: How many times will the following
Q20: A recursive function is designed to terminate
Q21: The programmer must ensure that a recursive
Q22: Select all that apply. Which of the
Q23: A problem can be solved with recursion