Multiple choice 19. When is storage for a stack implemented as a dynamically all
ID: 3790874 • Letter: M
Question
Multiple choice
19. When is storage for a stack implemented as a dynamically allocated array allocated and reclaimed?
a. Storage is allocated when elements are pushed on to the stack and reclaimed when elements are popped from the stack or control flow passes out of the locality where the stack was declared.
b. Storage is allocated when elements are pushed on to the stack and reclaimed when control flow passes out of the locality where the stack was declared.
c. Storage is allocated when the stack is declared and reclaimed when elements are popped from the stack or control flow passes out of the locality where the stack was declared.
d. Storage is allocated when stack is declared and reclaimed when control flow passes out of the locality where the stack was declared.
20. When is storage for a stack implemented as a dynamically allocated linked list of elements allocated and reclaimed?
a. Storage is allocated when elements are pushed on to the stack and reclaimed when elements are popped from the stack or control flow passes out of the locality where the stack was declared.
b. Storage is allocated when elements are pushed on to the stack and reclaimed when control flow passes out of the locality where the stack was declared.
c. Storage is allocated when the stack is declared and reclaimed when elements are popped from the stack or control flow passes out of the locality where the stack was declared.
d. Storage is allocated when stack is declared and reclaimed when control flow passes out of the locality where the stack was declared.
29. A palindrome is
a. writing material used one or more times after earlier writing has been erased.
b. an ode or song recanting or retracting something in an earlier poem.
c. a string that reads the same forward or backward.
d. a fence of stakes.
Explanation / Answer
19.ans: Storage is allocated when the stack is declared and reclaimed when elements are popped from the stack or control flow passes out of the locality where the stack was declared.
20.ans:Storage is allocated when elements are pushed on to the stack and reclaimed when elements are popped from the stack or control flow passes out of the locality where the stack was declared.
29.ans:writing material used one or more times after earlier writing has been erased.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.