wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

The following sequence of operations is performed on a stack:

PUSH (10), PUSH (20), POP, PUSH (10), PUSH (20), POP, POP, POP, PUSH (20), POP

The sequence of values popped out is:

A
10, 20, 20, 10, 20
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
20, 20, 10, 10, 20
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
20, 10, 20, 10, 20
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
20, 20, 10, 20, 10
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B 20, 20, 10, 10, 20

sequence of values popped out is 20, 20, 10, 10, 20

flag
Suggest Corrections
thumbs-up
0
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Petty Cash Book
ACCOUNTANCY
Watch in App
Join BYJU'S Learning Program
CrossIcon