Exam 18: Stacks and Queues
Exam 1: Introduction to Computers and Programming50 Questions
Exam 2: Introduction to C Plus Plus60 Questions
Exam 3: Expressions and Interactivity44 Questions
Exam 4: Making Decisions53 Questions
Exam 5: Loops and Files63 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays58 Questions
Exam 8: Searching and Sorting Arrays20 Questions
Exam 9: Pointers45 Questions
Exam 10: Characters, C-Strings, and More About the String Class45 Questions
Exam 11: Structured Data53 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes47 Questions
Exam 14: More About Classes40 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions40 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library Stl39 Questions
Exam 17: Linked Lists40 Questions
Exam 18: Stacks and Queues47 Questions
Exam 19: Recursion22 Questions
Exam 20: Binary Trees38 Questions
Select questions type
If you are using a compiler that is older than C++ 11, be sure to put spaces between the angled brackets that appear next to each other when defining a stack.
(True/False)
4.8/5
(34)
The ________ operation allows an item to be removed from a stack.
(Multiple Choice)
4.8/5
(39)
In a static stack class, the constructor function can dynamically allocate memory for the stack array.
(True/False)
4.8/5
(24)
The Standard Template Library offers a stack template that may be implemented as a:
(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.)
Assume that the pop function, called in lines 4 and 6, stores the number popped from the stack in the value variable.
What will the statement in line 7 display?

(Multiple Choice)
4.7/5
(41)
The programmer must declare in advance the size of a dynamic stack or queue.
(True/False)
4.9/5
(48)
In a dequeue operation, the element at the ________ of the queue is removed.
(Multiple Choice)
4.9/5
(51)
The pop function in the stack template does not retrieve the value from the top of the stack. It merely removes it.
(True/False)
4.9/5
(34)
This is a container that provides quick access to elements at the front and the back of the list.
(Multiple Choice)
4.9/5
(32)
The first item placed onto a stack is always the last item removed from the stack.
(True/False)
4.7/5
(35)
Queues that are implemented as arrays are called ________ queues.
(Multiple Choice)
4.8/5
(40)
Stacks are useful data structures for algorithms that work ________ with the ________ saved element in the series.
(Multiple Choice)
5.0/5
(42)
When an element is added to a queue, it is added to the rear. When an element is removed, it is removed from the ________.
(Multiple Choice)
4.8/5
(26)
In the following code, assume the myQueue object is a queue that can hold integers, and that value is an int variable. (The lines are numbered for reference purposes.)
Assume that the dequeue function, called in line 4, stores the number removed from the queue in the value variable.
What will the statement in line 5 display?

(Multiple Choice)
4.9/5
(46)
A stack that is implemented as a linked list is known as a deque.
(True/False)
4.9/5
(34)
Static stacks have a ________ size, and are implemented as ________.
(Multiple Choice)
4.9/5
(33)
A ________ is processed in a manner similar to customers standing in a grocery check-out line-the first customer in line is the first served.
(Multiple Choice)
4.7/5
(38)
Showing 21 - 40 of 47
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)