Test Bank For
C++ Programming From
Problem Analysis to Program
Design 8th Edition By D.S.
Malik
(All Chapters 1-18, 100%
Original Verified, A+ Grade)
All Chapters Arranged
Reverse: 18-1
This is The Original Test Bank
For 8th Edition, All other Files
in The Market are
Fake/Old/Wrong Edition.
,Name Clas Dat
: s: e:
Chapter 18
1. The bottom element of the stack is the last element added to the stack.
a. True
b. Fals
e
ANSWER: False
FEEDBACK: Correct The top element of the stack is the last element added to the
stack.
Incorrect The top element of the stack is the last element added to the
stack.
POINTS: 1
REFERENCES: 1211– Stacks
QUESTION TYPE: True / False
HAS VARIABLES: False
LEARNING OBJECTIVE PAPD.MALI.18.01 - Learn about stacks
S:
DATE CREATED: 10/5/2016 1:44 PM
DATE MODIFIED: 4/10/2020 6:42 AM
2. In the array representation of a stack, stackTop indicates the number of elements in the stack. If stack is nonempty,
then stackTop-1is the index of the top item of the stack.
a. True
b. Fals
e
ANSWER: True
FEEDBACK: Correct If stackTop is 0, then the stack is empty; otherwise, the stack is
nonempty.If stack is nonempty, then stackTop-1 is the index of the
top item of the stack.
Incorrec If stackTop is 0, then the stack is empty; otherwise, the stack is
t nonempty. If stack is nonempty, then stackTop-1 is the index of the
top item of the stack.
POINTS: 1
REFERENCES 1216 – Implementation of Stacks as Arrays
:
QUESTION TY True / False
PE:
HAS VARIABL False
ES:
LEARNING O PAPD.MALI.18.03 - Learn how to implement a stack as an array
BJECTIVES:
DATE CREAT 10/5/2016 1:44 PM
ED:
DATE MODIFI 4/10/2020 6:45 AM
ED:
,. Page 1
,Name Clas Dat
: s: e:
Chapter 18
3. If you try to add a new item to a full stack, the resulting condition is called an outflow.
a. True
b. Fals
e
ANSWER: False
FEEDBACK: Correct Adding a new item to a full stack results in overflow.
Incorrect Adding a new item to a full stack results in overflow.
POINTS: 1
REFERENCES: 1220– Push
QUESTION TYPE: True / False
HAS VARIABLES: False
LEARNING OBJECTIVES: PAPD.MALI.18.03 - Learn how to implement a stack as an array
DATE CREATED: 10/5/2016 1:44 PM
DATE MODIFIED: 4/10/2020 6:48 AM
4. In the linked implementation of stacks, the memory to store the stack elements is allocated statically.
a. True
b. Fals
e
ANSWER: False
FEEDBACK: Correct In the linked implementation of stacks, the memory to store the stack
elements is allocated dynamically, i.e., during program execution.
Incorrec In the linked implementation of stacks, the memory to store the stack
t elements is allocated dynamically, i.e., during program execution.
POINTS: 1
REFERENCES 1234 – Linked Implementation of Stacks
:
QUESTION TY True / False
PE:
HAS VARIABL False
ES:
LEARNING OB PAPD.MALI.18.04 - Learn how to implement a stack as a linked list
JECTIVES:
DATE CREATE 10/5/2016 1:44 PM
D:
DATE MODIFI 4/10/2020 6:49 AM
ED:
5. The default constructor for the linked implementation of a stack initializes the stack to an empty state when a stack
object is declared.
a.T rue
b. Fals
e
ANSWER: True
,. Page 2
, Name Clas Dat
: s: e:
Chapter 18
FEEDBACK: Correct The default constructor initializes the stack to the empty state when
the stack object is declared.
Incorrec The default constructor initializes the stack to the empty state when
t the stack object is declared.
POINTS: 1
REFERENCES: 1235 – Default Constructor
QUESTION TYPE: True / False
HAS VARIABLES: False
LEARNING OBJEC PAPD.MALI.18.04 - Learn how to implement a stack as a linked list
TIVES:
DATE CREATED: 10/5/2016 1:44 PM
DATE MODIFIED: 4/10/2020 6:53 AM
6. Postfix notation requires the use of parentheses to enforce operator precedence.
a. True
b. Fals
e
ANSWER: False
FEEDBACK: Correct In postfix notation, parentheses are
omitted.
Incorrect In postfix notation, parentheses are
omitted.
POINTS: 1
REFERENCES: 1245 – Application of Stacks: Postfix Expressions Calculator
QUESTION TYP True / False
E:
HAS VARIABLES False
:
LEARNING OBJ PAPD.MALI.18.05 - Learn about infix, prefix, and postfix expressions, and
ECTIVES: how to use a stack to evaluate postfix expressions.
DATE CREATED 10/5/2016 1:44 PM
:
DATE MODIFIE 4/10/2020 6:55 AM
D:
7. The infix expression
(a + b) * (c - d / e) + f
is equivalent to the postfix expression
ab + cde /-* f +
a.T rue
b. Fals
,. Page 3
C++ Programming From
Problem Analysis to Program
Design 8th Edition By D.S.
Malik
(All Chapters 1-18, 100%
Original Verified, A+ Grade)
All Chapters Arranged
Reverse: 18-1
This is The Original Test Bank
For 8th Edition, All other Files
in The Market are
Fake/Old/Wrong Edition.
,Name Clas Dat
: s: e:
Chapter 18
1. The bottom element of the stack is the last element added to the stack.
a. True
b. Fals
e
ANSWER: False
FEEDBACK: Correct The top element of the stack is the last element added to the
stack.
Incorrect The top element of the stack is the last element added to the
stack.
POINTS: 1
REFERENCES: 1211– Stacks
QUESTION TYPE: True / False
HAS VARIABLES: False
LEARNING OBJECTIVE PAPD.MALI.18.01 - Learn about stacks
S:
DATE CREATED: 10/5/2016 1:44 PM
DATE MODIFIED: 4/10/2020 6:42 AM
2. In the array representation of a stack, stackTop indicates the number of elements in the stack. If stack is nonempty,
then stackTop-1is the index of the top item of the stack.
a. True
b. Fals
e
ANSWER: True
FEEDBACK: Correct If stackTop is 0, then the stack is empty; otherwise, the stack is
nonempty.If stack is nonempty, then stackTop-1 is the index of the
top item of the stack.
Incorrec If stackTop is 0, then the stack is empty; otherwise, the stack is
t nonempty. If stack is nonempty, then stackTop-1 is the index of the
top item of the stack.
POINTS: 1
REFERENCES 1216 – Implementation of Stacks as Arrays
:
QUESTION TY True / False
PE:
HAS VARIABL False
ES:
LEARNING O PAPD.MALI.18.03 - Learn how to implement a stack as an array
BJECTIVES:
DATE CREAT 10/5/2016 1:44 PM
ED:
DATE MODIFI 4/10/2020 6:45 AM
ED:
,. Page 1
,Name Clas Dat
: s: e:
Chapter 18
3. If you try to add a new item to a full stack, the resulting condition is called an outflow.
a. True
b. Fals
e
ANSWER: False
FEEDBACK: Correct Adding a new item to a full stack results in overflow.
Incorrect Adding a new item to a full stack results in overflow.
POINTS: 1
REFERENCES: 1220– Push
QUESTION TYPE: True / False
HAS VARIABLES: False
LEARNING OBJECTIVES: PAPD.MALI.18.03 - Learn how to implement a stack as an array
DATE CREATED: 10/5/2016 1:44 PM
DATE MODIFIED: 4/10/2020 6:48 AM
4. In the linked implementation of stacks, the memory to store the stack elements is allocated statically.
a. True
b. Fals
e
ANSWER: False
FEEDBACK: Correct In the linked implementation of stacks, the memory to store the stack
elements is allocated dynamically, i.e., during program execution.
Incorrec In the linked implementation of stacks, the memory to store the stack
t elements is allocated dynamically, i.e., during program execution.
POINTS: 1
REFERENCES 1234 – Linked Implementation of Stacks
:
QUESTION TY True / False
PE:
HAS VARIABL False
ES:
LEARNING OB PAPD.MALI.18.04 - Learn how to implement a stack as a linked list
JECTIVES:
DATE CREATE 10/5/2016 1:44 PM
D:
DATE MODIFI 4/10/2020 6:49 AM
ED:
5. The default constructor for the linked implementation of a stack initializes the stack to an empty state when a stack
object is declared.
a.T rue
b. Fals
e
ANSWER: True
,. Page 2
, Name Clas Dat
: s: e:
Chapter 18
FEEDBACK: Correct The default constructor initializes the stack to the empty state when
the stack object is declared.
Incorrec The default constructor initializes the stack to the empty state when
t the stack object is declared.
POINTS: 1
REFERENCES: 1235 – Default Constructor
QUESTION TYPE: True / False
HAS VARIABLES: False
LEARNING OBJEC PAPD.MALI.18.04 - Learn how to implement a stack as a linked list
TIVES:
DATE CREATED: 10/5/2016 1:44 PM
DATE MODIFIED: 4/10/2020 6:53 AM
6. Postfix notation requires the use of parentheses to enforce operator precedence.
a. True
b. Fals
e
ANSWER: False
FEEDBACK: Correct In postfix notation, parentheses are
omitted.
Incorrect In postfix notation, parentheses are
omitted.
POINTS: 1
REFERENCES: 1245 – Application of Stacks: Postfix Expressions Calculator
QUESTION TYP True / False
E:
HAS VARIABLES False
:
LEARNING OBJ PAPD.MALI.18.05 - Learn about infix, prefix, and postfix expressions, and
ECTIVES: how to use a stack to evaluate postfix expressions.
DATE CREATED 10/5/2016 1:44 PM
:
DATE MODIFIE 4/10/2020 6:55 AM
D:
7. The infix expression
(a + b) * (c - d / e) + f
is equivalent to the postfix expression
ab + cde /-* f +
a.T rue
b. Fals
,. Page 3