Question: Question 4 6 void printNum ( int num ) / / Line 1 if ( n 0 ) cout Num is negative endl; else

Question 46
void printNum(int num)
//Line 1
\
if (n0)
cout "Num is negative" endl;
else if (num ==0)
cout "Num is zero" endl;
else
1
cout num ";
printNum (num -1):
}
//Line 2
//Line 3
//Line 4
//Line 5
//Line 6
//Line 7
//Line 8
//Line 9
//Line 10
//Line 11
//Line 12
Consider the accompanying definition of a recursive function. Which of the statements represent the general
case?
Statements in Lines 3 to 11
Statements in Lines 5 and 6
Statements in Lines 5 to 11
Statements in Lines 7 to 11
Question 4 6 void printNum ( int num ) / / Line 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!