In the array implementation of the stack, top is decremented in the pop function because:

A. it is an index to the current top of the stack, and that index decreases by one on a pop
B. it stores the value of the current top of the stack, and a value lower in the stack is always less
C. top records the number of elements in the stack, and the number of elements decreases by one on a pop
D. otherwise, there would be no way to access the array position that needs popped

A

Computer Science & Information Technology

You might also like to view...

In computer management, the Format command will:

A) Change the computer's time B) Erase the contents of a disk C) Reboot the computer D) Format the name of the disk

Computer Science & Information Technology

An encryption/decryption system requires a point G and an elliptic group _________ as parameters.

A. Eb(a,q) B. Ea(q,b) C. En(a,b) D. Eq(a,b)

Computer Science & Information Technology