Exam 18: Stacks and Queues
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C50 Questions
Exam 3: Inputoutput50 Questions
Exam 4: Control Structures I Selection50 Questions
Exam 5: Control Structures II Repetition50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the String Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records Structs50 Questions
Exam 10: Classes and Data Abstraction49 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Searching, Sorting and the Vector Type50 Questions
Exam 17: Linked Lists50 Questions
Exam 18: Stacks and Queues50 Questions
Select questions type
The operation ____________________ reinitializes a stack to an empty state.
(Short Answer)
4.8/5
(38)
To describe a queuing system, we use the term ____ for the object receiving the service.
(Multiple Choice)
4.7/5
(33)
When describing a queuing system, we use the term ____________________ to refer to the time it takes to serve a customer.
(Short Answer)
4.8/5
(30)
____________________ techniques are used when it is too expensive or dangerous to experiment with real systems.
(Short Answer)
4.8/5
(36)
A stack can be implemented as either a(n) ____ or a linked structure.
(Multiple Choice)
4.9/5
(42)
What is the output of the following code? queueType<int> queue;
int x, y;
x = 2;
y = 3;
queue.addQueue(x);
queue.addQueue(y);
x = queue.front();
queue.deleteQueue();
queue.addQueue(x + 2);
queue.addQueue(x);
queue.addQueue(y - 3);
y = queue.front();
queue.deleteQueue();
cout << "x = " << x << endl;
cout << "y = " << y << endl;
(Multiple Choice)
4.9/5
(33)
The postfix expression 3 5 + 2 ; 6 - = will generate an error, because it ____.
(Multiple Choice)
4.7/5
(46)
When a stack is implemented as an array, the array is empty if the value of stackTop is ____.
(Multiple Choice)
4.9/5
(46)
The addition and deletion of elements of a stack occurs only at the ____ of the stack.
(Multiple Choice)
4.8/5
(43)
What is the output of the following code? queueType<int> queue;
int x, y;
x = 2;
y = 6;
queue.addQueue(x);
queue.addQueue(y);
x = queue.front();
queue.deleteQueue();
queue.addQueue(x + 2);
queue.addQueue(x);
queue.addQueue(y - 3);
while (!queue.isEmptyQueue())
{
cout << queue.front() << " ";
queue.deleteQueue();
}
cout << endl
(Multiple Choice)
4.9/5
(39)
Showing 41 - 50 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)