

MCQOPTIONS
Saved Bookmarks
This section includes 3 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structure Questions and Answers knowledge and support exam preparation. Choose a topic below to get started.
1. |
Assume that the operators +,-, X are left associative and ^ is right associative. The order of precedence (from highest to lowest) is ^, X, +, -. The postfix expression for the infix expression a + b X c – d ^ e ^ f is? |
A. | abc X+ def ^^ – |
B. | abc X+ de^f^ – |
C. | ab+c Xd – e ^f^ |
D. | -+aXbc^ ^def |
Answer» C. ab+c Xd – e ^f^ | |
2. |
Convert the following Infix expression to Postfix form using a stack. |
A. | x + y * z + (p * q + r) * s, Follow usual precedence rule and assume that the expression is legal. |
B. | xyz*+pq*r+s*+ |
C. | xyz*+pq*r+s+* |
D. | xyz+*pq*r+s*+ |
E. | xyzp+**qr+s*+ |
Answer» B. xyz*+pq*r+s*+ | |
3. |
Convert the following infix expressions into its equivalent postfix expressions. |
A. | (A + B ⋀D)/(E – F)+G |
B. | (A B D ⋀ + E F – / G +) |
C. | (A B D +⋀ E F – / G +) |
D. | (A B D ⋀ + E F/- G +) |
E. | (A B D E F + ⋀ / – G +) |
Answer» B. (A B D ⋀ + E F – / G +) | |