Exam 18: Stacks and Queues
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures II Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes43 Questions
Exam 13: Overloading and Templates41 Questions
Exam 14: Exception Handling42 Questions
Exam 15: Recursion41 Questions
Exam 16: Searching and Sorting46 Questions
Exam 17: Linked Lists41 Questions
Exam 18: Stacks and Queues42 Questions
Select questions type
What is the output of the following code? 

Free
(Multiple Choice)
4.8/5
(29)
Correct Answer:
C
A(n) ____ is a list of homogenous elements in which the addition and deletion of elements occurs only at one end.
Free
(Multiple Choice)
4.7/5
(34)
Correct Answer:
A
When a stack is implemented as an array, the array is empty if the value of stackTop is ____.
Free
(Multiple Choice)
4.7/5
(33)
Correct Answer:
A
In evaluating a postfix expression, when an equal sign (=) is encountered, how many elements must the stack contain so that no error is generated?
(Multiple Choice)
4.9/5
(38)
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
(26)
In the array representation of a stack, the stack is initialized simply by setting stackTop to ____________________.
(Short Answer)
4.7/5
(31)
The postfix expression 3 5 + 2 ; 6 - = will generate an error, because it ____.
(Multiple Choice)
4.9/5
(33)
The postfix expression 14 2 5 + = will generate an error, because ____.
(Multiple Choice)
4.7/5
(34)
The elements at the ____________________ of the stack have been in the stack the longest.
(Short Answer)
4.9/5
(36)
In the array representation of a stack, if a value called stackTop indicates the number of elements in the stack, then stackTop-1 points to the top item of the stack.
(True/False)
4.9/5
(36)
The bottom element of the stack is the last element added to the stack.
(True/False)
4.9/5
(31)
The ____ element of the stack is the last element added to the stack.
(Multiple Choice)
4.9/5
(32)
In ____________________ notation, operators are written after the operands.
(Short Answer)
4.9/5
(29)
To describe a queuing system, we use the term ____ for the object receiving the service.
(Multiple Choice)
4.9/5
(35)
In a queuing system, every customer has a customer number, arrival time, ____________________ time, transaction time, and departure time.
(Short Answer)
4.8/5
(36)
The following expression (a - b) * (c + d) is equivalent to which of the following postfix expressions?
(Multiple Choice)
4.9/5
(46)
The postfix expression 2 4 6 * + 15 - 21 7 / + = evaluates to ____.
(Multiple Choice)
4.7/5
(37)
Showing 1 - 20 of 42
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)