100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Test Bank C++ Programming From Problem Analysis to Program Design 5th Edition By D. S. Malik

Rating
-
Sold
-
Pages
144
Grade
A+
Uploaded on
06-12-2025
Written in
2025/2026

Test Bank C++ Programming From Problem Analysis to Program Design 5th Edition By D. S. Malik Test Bank C++ Programming From Problem Analysis to Program Design 5th Edition By D. S. Malik

Institution
C++ Programming From Problem Analysis To Program
Course
C++ Programming From Problem Analysis to Program











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
C++ Programming From Problem Analysis to Program
Course
C++ Programming From Problem Analysis to Program

Document information

Uploaded on
December 6, 2025
Number of pages
144
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

  • mcqs

Content preview

Test Bank C++ Programming
From Problem Analysis to
Program Design 5th Edition By
D. S. Malik (All Chapters 1-19,
100% Original Verified, A+
Grade)
All Chapters Arranged Reverse: 19-1

This is The Only Original and
Complete Test Bank for 5 th

Edition, All Other Files in the
Market are Fake/Old/Wrong
Edition.

,Chapter 19: Stacks and Queues


TRUE/FALSE

1. A stack is a First In First Out data structure.

ANS: F PTS: 1 REF: 1117

2. The operation used to add elements to a stack is called pop.

ANS: F PTS: 1 REF: 1117

3. The top operation is performed to remove the element from the top of a stack.

ANS: F PTS: 1 REF: 1117

4. The elements at the bottom of the stack have been in the stack the longest.

ANS: T PTS: 1 REF: 1117

5. The bottom element of the stack is the last element added to the stack.

ANS: F PTS: 1 REF: 1117

6. A stack can only be implemented as a list.

ANS: F PTS: 1 REF: 1120

7. A stack is a random access data structure.

ANS: F PTS: 1 REF: 1120

8. Because the class stackType has a pointer data member, you must overload the assignment operator
and include the copy constructor and destructor.

ANS: T PTS: 1 REF: 1120

9. The initializeStack operation initializes the stack to an empty state.

ANS: T PTS: 1 REF: 1120

10. In the array representation of a stack, the stack is initialized simply by setting stackTop to 0.

ANS: T PTS: 1 REF: 1123-1124

11. In the array representation of a stack, an unlimited number of elements can be pushed onto the stack.

ANS: F PTS: 1 REF: 1126

12. 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.

, ANS: T PTS: 1 REF: 1126

13. If you try to add a new item to a full stack, the resulting condition is called an outflow.

ANS: F PTS: 1 REF: 1126

14. In the linked implementation of stacks, the stack is full only if you run out of memory space.

ANS: T PTS: 1 REF: 1140

15. In the linked implementation of stacks, the memory to store the stack elements is allocated statically.

ANS: F PTS: 1 REF: 1140

16. The default constructor for the linked implementation of a stack initializes the stack to an empty state
when a stack object is declared.

ANS: T PTS: 1 REF: 1141

17. In postfix notation, operators are written after the operands.

ANS: T PTS: 1 REF: 1151

18. Postfix notation requires the use of parentheses to enforce operator precedence.

ANS: F PTS: 1 REF: 1151

19. The infix expression

(a + b) * (c - d / e) + f

is equivalent to the postfix expression

ab + cde /-* f +

ANS: T PTS: 1 REF: 1152

20. The expression a + b is the same in both infix notation and postfix notation.

ANS: F PTS: 1 REF: 1152

21. All queue elements must be of the same type.

ANS: T PTS: 1 REF: 1165

22. A queue is a First In First Out data structure.

ANS: T PTS: 1 REF: 1166

23. A queue can only be implemented as a linked list.

ANS: F PTS: 1 REF: 1168

24. In a circular array, the first array position immediately follows the last array position.

, ANS: T PTS: 1 REF: 1170

25. If the queue is empty, the operation back terminates the program.

ANS: T PTS: 1 REF: 1173

26. Only a finite number of queue elements can be stored in an array.

ANS: T PTS: 1 REF: 1177

27. One of the most widely used applications of queues is computer simulation.

ANS: T PTS: 1 REF: 1183-1184


MULTIPLE CHOICE

1. A(n) ____ is a list of homogenous elements in which the addition and deletion of elements occurs only
at one end.
a. stack c. array
b. queue d. linked list
ANS: A PTS: 1 REF: 1116

2. The addition and deletion of elements of the stack occurs only at the ____ of the stack.
a. head c. top
b. bottom d. middle
ANS: C PTS: 1 REF: 1116

3. The ____ element of the stack is the last element added to the stack.
a. top c. head
b. bottom d. tail
ANS: A PTS: 1 REF: 1117

4. A stack is a(n) ____ data structure.
a. FIFO c. LIFO
b. FILO d. LILO
ANS: C PTS: 1 REF: 1117

5. You can perform the add operation, called ____, to add an element onto the stack.
a. pop c. enqueue
b. push d. dequeue
ANS: B PTS: 1 REF: 1117

6. You can perform the operation ____ to remove the top element from the stack.
a. dequeue c. pop
b. top d. push
ANS: C PTS: 1 REF: 1117

7. A stack can be implemented as either a(n) ____ or a linked structure.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
tutorsection Teachme2-tutor
View profile
Follow You need to be logged in order to follow users or courses
Sold
7454
Member since
2 year
Number of followers
3245
Documents
5839
Last sold
8 hours ago
TutorSection

Best Educational Resources for Student. We are The Only Original and Complete Study Resources Provider in the Market. Majority of the Competitors in the Market are Selling Fake/Old/Wrong Edition files with cheap price attraction for customers.

4.1

1117 reviews

5
654
4
200
3
100
2
55
1
108

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions