Question: I am having a hard time understanding this program. I dont understand why this program prints c as 4 instead of 5 on the line

I am having a hard time understanding this program.

I dont understand why this program prints c as 4 instead of 5 on the line commented in the code.

I know a is 1 and b is 2 because when the recursion call ends those variable goes away.

A remains 1 because of the global variable, and b remains 2 due to the local B in main().

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 Databases Questions!