Multiple choice technology mainframe

"MAKEBUF" "MAKEBUF" "DROPBUF" "MAKEBUF" "QBUF" What QBUF will return?

  1. Returns 1

  2. Returns 3

  3. Returns 2

  4. Returns 0

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Tracing the stack operations: MAKEBUF (stack=1), MAKEBUF (stack=2), DROPBUF (stack=1), MAKEBUF (stack=2), then QBUF returns 2. DROPBUF removes one buffer level, reducing stack depth from 2 to 1, then MAKEBUF increases it back to 2. QBUF always returns the current stack depth.