Exam 18: Stacks and Queues
Exam 1: Introduction to Computers and Programming44 Questions
Exam 2: Introduction to C++56 Questions
Exam 3: Expressions and Interactivity44 Questions
Exam 4: Making Decisions53 Questions
Exam 5: Loops and Files62 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays53 Questions
Exam 8: Searching and Sorting Arrays20 Questions
Exam 10: Characters, C++-Strings, and More About the String Class42 Questions
Exam 11: Structured Data43 Questions
Exam 11: Structured Data50 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes46 Questions
Exam 14: More About Classes40 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions38 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library STL39 Questions
Exam 17: Linked Lists40 Questions
Exam 18: Stacks and Queues46 Questions
Exam 19: Recursion21 Questions
Exam 20: Binary Trees38 Questions
Select questions type
If data is transmitted faster than it can be processed, it can be held in a ___________ for processing.
(Multiple Choice)
4.8/5
(35)
A queue is a data structure that stores and retrieves items in this manner.
(Multiple Choice)
4.8/5
(38)
Queues that are implemented as arrays are called ____________ queues.
(Multiple Choice)
4.8/5
(32)
Data structures that can dynamically store elements and can grow and shrink in size are:
(Multiple Choice)
4.7/5
(34)
A stack that is implemented as a linked list is known as a deque.
(True/False)
4.9/5
(37)
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.) 1: myStack.push(0);
2: myStack.push(1);
3: myStack.push(2);
4: myStack.pop(value);
5: cout << value << endl;
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
(42)
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.)
1: myStack.push(0);
2: myStack.push(1);
3: myStack.push(2);
4: myStack.pop(value);
5: myStack.push(3);
6: myStack.pop(value);
7: cout << value << endl;
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.8/5
(46)
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.8/5
(37)
A(n) _________ is an abstract data type that stores and retrieves items in a last-in-first-out manner.
(Multiple Choice)
4.7/5
(31)
The Standard Template Library offers a stack template that may be implemented as a:
(Multiple Choice)
4.9/5
(38)
The following statement stack< int, vector<int> > iStack;
Indicates:
(Multiple Choice)
4.9/5
(39)
The ___________ operation allows an item to be removed from a stack.
(Multiple Choice)
5.0/5
(36)
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
(38)
___________ queues are more intuitive and easier to understand than ______ queues.
(Multiple Choice)
4.8/5
(35)
In a static stack class, the constructor function can dynamically allocate memory for the stack array.
(True/False)
4.7/5
(47)
Showing 21 - 40 of 46
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)