MCQOPTIONS
Saved Bookmarks
This section includes 4 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structure knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
If the elements A , B , C and D are placed in a stack and are deleted one at a time, what is the order of removal? |
| A. | ABCD |
| B. | DCBA |
| C. | DCAB |
| D. | ABDC |
| Answer» C. DCAB | |
| 2. |
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^ | |
| 3. |
Convert the following Infix expression to Postfix form using a stack.x + y * z + (p * q + r) * s, Follow usual precedence rule and assume that the expression is legal. |
| A. | xyz*+pq*r+s*+ |
| B. | xyz*+pq*r+s+* |
| C. | xyz+*pq*r+s*+ |
| D. | xyzp+**qr+s*+ |
| Answer» B. xyz*+pq*r+s+* | |
| 4. |
Convert the following infix expressions into its equivalent postfix expressions.(A + B D)/(E F)+G |
| 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 +) |
| Answer» B. (A B D + E F / G +) | |