CBSE Class 12 Computer Science Question 54 of 63

Data Structures in Python — Question 2

Back to all questions
2
Question

Question 2

Reversing a word/line is an application of Stack.

Answer

True

Reason — Reversing a word or a line is an application of the stack data structure. This can be accomplished by pushing each character onto a stack as it is read. When the line is finished, characters are popped off the stack, and they will come off in reverse order.