# YOU CAN DOWNLOAD 200+ SUBJECTS PDF BOOK FOR COMPETITIVE EXAMINATIONS

## Evaluation of a Postfix Expression Multiple choice Questions and Answers (MCQs)

Question 6 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

Which of these operators have the highest order of precedence?

'(' and ')' | |

'*' and '/' | |

'~' and '^' | |

'+' and '-' |

Question 6 Explanation:

The highest order of precedence is ~ and ^ followed by '*', ' /', '+', '-' and then braces '(' ')'.

Question 7 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

Which of the following is not an application of stack?

evaluation of postfix expression | |

conversion of infix to postfix expression | |

balancing symbols | |

line at ticket counter |

Question 7 Explanation:

Line at ticket counter is an application of queue whereas conversion of infix to postfix expression, balancing symbols, line at ticket counter are stack applications.

Question 8 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

While evaluating a postfix expression, when an operator is encountered, what is the correct operation to be performed?

push it directly on to the stack | |

pop 2 operands, evaluate them and push the result on to the stack | |

pop the entire stack | |

ignore the operator |

Question 8 Explanation:

When an operator is encountered, the first two operands are popped from the stack, they are evaluated and the result is pushed into the stack.

Question 9 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

Which of the following statement is incorrect?

Postfix operators use value to their right | |

Postfix operators use value to their left | |

Prefix operators use value to their right | |

In postfix expression, operands are followed by operators |

Question 9 Explanation:

All prefix operators use values to their right and all postfix operators use values to their left.

Question 10 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

What is the result of the given postfix expression? abc*+ where a=1, b=2, c=3.

4 | |

5 | |

6 | |

7 |

Question 10 Explanation:

The infix expression is a+b*c. Evaluating it, we get 1+2*3=7.

There are 10 questions to complete.