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
Get step-by-step solutions from verified subject matter experts
