Exam 18: Stacks and Queues

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

In the following code, assume the myStack object is a stack that can hold integers, and that value is an int variable. (The lines are numbered for reference purposes.) In the following code, assume the myStack object is a stack that can hold integers, and that value is an int variable. (The lines are numbered for reference purposes.)   Assume that the pop function, called in line 4, stores the number popped from the stack in the value variable. What will the statement in line 5 display? Assume that the pop function, called in line 4, stores the number popped from the stack in the value variable. What will the statement in line 5 display?

(Multiple Choice)
4.9/5
(38)

Data structures that can dynamically store elements and can grow and shrink in size are:

(Multiple Choice)
4.8/5
(45)

In the following code, assume the myStack object is a stack that can hold integers, and that value is an int variable. (The lines are numbered for reference purposes.) In the following code, assume the myStack object is a stack that can hold integers, and that value is an int variable. (The lines are numbered for reference purposes.)   Assume that the pop function, called in lines 4, 5, and 6, stores the number popped from the stack in the value variable. What will the statement in line 7 display? Assume that the pop function, called in lines 4, 5, and 6, stores the number popped from the stack in the value variable. What will the statement in line 7 display?

(Multiple Choice)
4.9/5
(42)

A dynamic stack may be implemented as a(n)________, and expand or shrink with each push or pop operation.

(Multiple Choice)
4.9/5
(40)

The following statement: The following statement:   Indicates: Indicates:

(Multiple Choice)
4.8/5
(32)

This is a double-ended queue.

(Multiple Choice)
4.9/5
(38)

The pop function in the stack template of the STL does not retrieve the value from the top of the stack.

(True/False)
4.7/5
(49)
Showing 41 - 47 of 47
close modal

Filters

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