MCQ On Stack - Data Structure
21. Which data structure is needed to convert infix notation to postfix notation?
A. Branch
B. Tree
C. Queue
D. Stack
View Answer
Ans : D
Explanation: None.
22. The prefix form of A-B/ (C * D ^ E) is?
A. -/*^ACBDE
B. -ABCD*^DE
C. -A/B*C^DE
D. -A/BC*^DE
View Answer
Ans : B
Explanation: Process of inserting an element in stack is called Push.
23. The postfix form of A*B+C/D is?
A. *AB/CD+
B. AB*CD/+
C. A*BC+/D
D. ABCD+/*
View Answer
Ans : C
Explanation: Applying the prefix expression evaluation..
24.What is the result of the following operation
Top (Push (S, X))
A. X
B. Null
C. S
D. None of the mentioned
View Answer
Ans : A
Explanation: None.
25.The prefix form of an infix expression p + q – r * t is?
A. + pq – *rt
B. – +pqr * t
C. – +pq * rt
D. – + * pqrt
View Answer
Ans : C
Explanation: Applying the prefix expression evaluation.
Also Check :
Discussion