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
A(n)________ is an abstract data type that stores and retrieves items in a last-in-first-out manner.
Free
(Multiple Choice)
4.8/5
(35)
Correct Answer:
C
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 lines 4, 5, and 6, stores the number removed from the queue in the value variable.
What will the statement in line 7 display?

(Multiple Choice)
4.8/5
(33)
If data is transmitted faster than it can be processed, it can be held in a ________ for processing.
(Multiple Choice)
4.9/5
(37)
A real-world example of the queue data structure can be seen in a stack of cafeteria trays, where the last tray pushed onto the stack is the first tray removed.
(True/False)
4.8/5
(39)
The queue data structure is commonly applied in connection with:
(Multiple Choice)
4.8/5
(36)
The ________ operation allows an item to be stored on a stack.
(Multiple Choice)
4.9/5
(36)
When the program knows the exact contents of a list and can access any element on demand, the data structure is known as a stacked deque.
(True/False)
4.7/5
(36)
A queue is a data structure that stores and retrieves items in this manner.
(Multiple Choice)
4.8/5
(26)
A practical application of the stack data type in a computer system is:
(Multiple Choice)
5.0/5
(42)
________ queues are more intuitive and easier to understand than ________ queues.
(Multiple Choice)
4.8/5
(37)
A dynamic stack has a ________ size, and is implemented as a(n)________.
(Multiple Choice)
4.9/5
(33)
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 lines 4, and 6, stores the number removed from the queue in the value variable.
What will the statement in line 7 display?

(Multiple Choice)
4.8/5
(31)
Showing 1 - 20 of 47
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)