Answer to Question #284842 in C++ for Tatheer

Question #284842

Dry run the following code and draw the tree to show how recursion is solved. On writing only


output you will get zero number.


a) fun1(5)


void fun1(int n)


{


int i = 0;


if (n > 1)


fun1(n - 1);


for (i = 0; i < n; i++)


cout << " * ";


}

1
Expert's answer
2022-01-05T01:40:44-0500

Output: 

*  *  *  *  *  *  *  *  *  *  *  *  *  *  *

Recursion calls tree:


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog