Solved

How Many Times Will the Following Function Call Itself If \quad

Question 21

Multiple Choice

How many times will the following function call itself if 5 is passed as the argument?
Void showMessage(int n)
{
\quad If (n > 0)
\quad {
\quad\quad Cout << "Good day!" << endl;
\quad\quad ShowMessage(n - 1) ;
\quad }
}


A) 1
B) 4
C) 5
D) An infinite number of times

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