Exam 18: Stacks and Queues

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

In a(n) ____________________ array, the first array position immediately follows the last array position.

Free
(Short Answer)
4.8/5
(32)
Correct Answer:
Verified

circular

The bottom element of the stack is the last element added to the stack.

Free
(True/False)
4.8/5
(32)
Correct Answer:
Verified

False

A queue is a data structure in which the elements are ____.

Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
Verified

A

The postfix expression 5 6 + 4 * 10 5 / - = evaluates to ____.

(Multiple Choice)
4.8/5
(43)

A technique in which one system models the behavior of another system is called ____.

(Multiple Choice)
4.8/5
(39)

The default constructor for the linked implementation of a stack initializes the stack to an empty state when a stack object is declared.

(True/False)
4.8/5
(33)

In the late 1950s, the Australian philosopher and early computer scientist Charles L. Hamblin proposed a scheme in which the operators follow the operands (postfix operators), resulting in ____________________ notation.

(Short Answer)
5.0/5
(33)

You can perform the operation ____ to remove the top element from the stack.

(Multiple Choice)
4.7/5
(38)

In a queuing system, every customer has a customer number, arrival time, ____________________ time, transaction time, and departure time.

(Short Answer)
4.9/5
(41)

Which of the following is listed in the chapter as a basic operation performed on a queue?

(Multiple Choice)
4.9/5
(36)

Popping an element from an empty stack is called ____.

(Multiple Choice)
4.8/5
(36)

The expression a + b is the same in both infix notation and postfix notation.

(True/False)
4.9/5
(38)

The infix expression (a + b) * (c - d / e) + f is equivalent to the postfix expression ab + cde /-* f +

(True/False)
4.7/5
(34)

In a(n) ____________________ simulation, the clock is implemented as a counter, and the passage of, say, one minute can be implemented by incrementing the counter by 1.

(Short Answer)
4.9/5
(36)

A(n) ____ is a list of homogenous elements in which the addition and deletion of elements occurs only at one end.

(Multiple Choice)
4.9/5
(38)

If you try to add a new item to a full stack, the resulting condition is called an outflow.

(True/False)
4.9/5
(41)

To describe a queuing system, we use the term ____ for the object that provides the service.

(Multiple Choice)
4.8/5
(36)

What is the output of the following code? stackType<int> stack; int x, y; x = 4; y = 2; stack.push(6); stack.push(x); stack.push(x + 1); y = stack.top(); stack.pop(); stack.push(x + y); x = stack.top(); stack.pop(); cout << "x = " << x << endl;

(Multiple Choice)
4.8/5
(33)

The ____________________ constructor is called when a stack object is passed as a (value) parameter to a function.

(Short Answer)
4.8/5
(43)

If the queue is empty, the operation ____________________ terminates the program.

(Short Answer)
5.0/5
(30)
Showing 1 - 20 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)