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
In a(n) ____________________ array, the first array position immediately follows the last array position.
Free
(Short Answer)
4.8/5
(32)
Correct Answer:
circular
The bottom element of the stack is the last element added to the stack.
Free
(True/False)
4.8/5
(32)
Correct Answer:
False
A queue is a data structure in which the elements are ____.
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
A
The postfix expression 5 6 + 4 * 10 5 / - = evaluates to ____.
(Multiple Choice)
4.8/5
(43)
A technique in which one system models the behavior of another system is called ____.
(Multiple Choice)
4.8/5
(39)
The default constructor for the linked implementation of a stack initializes the stack to an empty state when a stack object is declared.
(True/False)
4.8/5
(33)
In the late 1950s, the Australian philosopher and early computer scientist Charles L. Hamblin proposed a scheme in which the operators follow the operands (postfix operators), resulting in ____________________ notation.
(Short Answer)
5.0/5
(33)
You can perform the operation ____ to remove the top element from the stack.
(Multiple Choice)
4.7/5
(38)
In a queuing system, every customer has a customer number, arrival time, ____________________ time, transaction time, and departure time.
(Short Answer)
4.9/5
(41)
Which of the following is listed in the chapter as a basic operation performed on a queue?
(Multiple Choice)
4.9/5
(36)
The expression a + b is the same in both infix notation and postfix notation.
(True/False)
4.9/5
(38)
The infix expression
(a + b) * (c - d / e) + f
is equivalent to the postfix expression
ab + cde /-* f +
(True/False)
4.7/5
(34)
In a(n) ____________________ simulation, the clock is implemented as a counter, and the passage of, say, one minute can be implemented by incrementing the counter by 1.
(Short Answer)
4.9/5
(36)
A(n) ____ is a list of homogenous elements in which the addition and deletion of elements occurs only at one end.
(Multiple Choice)
4.9/5
(38)
If you try to add a new item to a full stack, the resulting condition is called an outflow.
(True/False)
4.9/5
(41)
To describe a queuing system, we use the term ____ for the object that provides the service.
(Multiple Choice)
4.8/5
(36)
What is the output of the following code? stackType<int> stack;
int x, y;
x = 4;
y = 2;
stack.push(6);
stack.push(x);
stack.push(x + 1);
y = stack.top();
stack.pop();
stack.push(x + y);
x = stack.top();
stack.pop();
cout << "x = " << x << endl;
(Multiple Choice)
4.8/5
(33)
The ____________________ constructor is called when a stack object is passed as a (value) parameter to a function.
(Short Answer)
4.8/5
(43)
If the queue is empty, the operation ____________________ terminates the program.
(Short Answer)
5.0/5
(30)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)