Here, our selection expression is 2 + 6, which is 8, so

we're going to go into the case for 8 and begin executing statements there.

The first statement we encounter is x = x + 1, so

we update the box for x to have 3 instead of 2.

Now we fall through to the next case.

There is no break statement here, and

we don't worry about the fact that there is another case label.

We just keep executing statements until we reach a break.

The next statement is n = n- 1.

So we're going to update the value of n to be 5.

And now we do reach a break statement.

This break statement is going to take us out of the innermost

enclosing switch statement, the boundaries which are here.

As we'll see later, break could take us out of other constructs.

But in this case, it'll take us out of the switch statement that encloses it and

we begin executing code after the switch.

The next statement we encounter says to return x * n, which is 3 * 5, which is 15.

So we return 15, return to main, and

destroy the frame for g and assign 15 to b.

Now we have int c = g(9, b).

So we create a box for c, a frame for g with arguments 9 and

b which is 15 and note where we are and enter function g.

Evaluating this expression gives us 24.

Looking at our case labels, we have 8, 0, and 14.

None of those match 24, so we use the default which matches anything that's not

named explicitly by another case label.

We'll jump into the default case and begin executing statements there.

We do x = n, assigning 9 to x which brings us to a break

which takes us out of the inside of the switch statement.

We now return x * n which is 81.

Back to main, we finish our assignment and return zero from main exiting the program.