While implementing a stack on a register stack, the stack pointer register is:
2018
While implementing a stack on a register stack, the stack pointer register is:
- A.
Incremented first during push operation
- B.
Decremented first during push operation
- C.
Incremented first during pop operation
- D.
Decremented first during pop operation
Attempted by 633 students.
Show answer & explanation
Correct answer: B
Key points: The register stack grows downward: addresses decrease as new items are pushed.