My problem is with getting results in the stacks as shown on pp. 38-39. No matter which frame I look at, I get numberOfBottles = -1 and oneFewer = -1. However, the printf statements are printing the correct results each time.
Should have used the above title in my initial post.
How can all of the stacks show numberOfBottles = -1 and oneFewer = -1 when printf is printing correct values for both of them every time it executes the loop?
I have the same doubt, please someone help!
Hey! Can you provide a copy of your code?