Question: Multiple Choice Questions for stacks and queues. 1. By definition, a stack must be a(n) a) FIFO structure b) LIFO structure c) linked structure d)

Multiple Choice Questions for stacks and queues.

1. By definition, a stack must be a(n)

a) FIFO structure

b) LIFO structure

c) linked structure

d) array-based structure

2. Which of the following is not a stack operation?

a) push

b) unstack

c) pop

d) top

3. Which one the following is not an application of a stack?

a) Keeping track of command history for an undo feature.

b) Keeping track of function calls in a running program.

c) Checking for proper nesting of parentheses.

d) All of the above are stack applications.

4. What is the result of evaluating the postfix expression 5 4 3 + 2 * -?

a) -2

b) 3

c) 15

d) None of these

5. What is the correct postfix form for 3 + 4 * 5?

a) 3 4 + 5 *

b) 3 4 * 5 +

c) 3 4 5 + *

d) 3 4 5 * +

6. By definition, a queue must be a(n)

a) FIFO structure

b) LIFO structure

c) linked structure

d) array-based structure

7. Which of the following is not an operation of the queue ADT?

a) enqueue

b) dequeue

c) requeue

d) front

8. Which implementation of a queue cannot guarantee (1) behavior for all operations:

a) a circular list/array implementation

b) a linked implementation with front and back references

c) a Python list implementation using insert and pop

d) All of the above yield (1) operations.

9. The process of splitting a string up into its meaningful pieces is called

a) splitation.

b) sematic chopping.

c) syntactic chopping.

d) lexical analysis.

10. When using linked implementations of a queue, where should insertions be done?

a) at the front (head) of the linked list

b) and the end (tail) of the linked list

c) in the middle of the linked list

d) either a) or b) will work

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!