What is the outcome of the prefix expression +, -, *, 5, 4, /, 8, 4, 1?
Answers
Answer:
Explanation:
This set of Data Structures & Algorithms Multiple Choice Questions & Answers (MCQs) focuses on “Evaluation of a Prefix Expression”.
1. How many stacks are required for evaluation of prefix expression?
a) one
b) two
c) three
d) four
View Answer
2. While evaluating a prefix expression, the string is read from?
a) left to right
b) right to left
c) center to right
d) center to left to right
View Answer
3. The associativity of an exponentiation operator ^ is right side.
a) True
b) False
View Answer
4. How many types of input characters are accepted by this algorithm?
a) one
b) two
c) three
d) four
View Answer
5. What determines the order of evaluation of a prefix expression?
a) precedence and associativity
b) precedence only
c) associativity only
d) depends on the parser
View Answer
advertisement
6. Find the output of the following prefix expression.
SAN Developer