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

 

 Buy/Download all MCQ Ebook   >>>Click Here<<<

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

Click on any option to know the CORRECT ANSWERS

Question 1
How many stacks are required for evaluation of prefix expression?
A
one
B
two
C
three
D
four
Management Questions answers

Question 1 Explanation: 
2 stacks are required for evaluation of postfix expression, one for integers and one for characters.

Question 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
UPSC test Questions answers

Question 2 Explanation: 
The string is read from right to left because a prefix string has operands to its right side.

Question 3
The associativity of an exponentiation operator ^ is right side.
A
True
B
False
UPSC Questions answers

Question 3 Explanation: 
The associativity of ^ is right side while the rest of the operators like +, -, *, / has its associativity to its left.

Question 4
How many types of input characters are accepted by this algorithm?
A
one
B
two
C
three
D
four
UPSC Questions answers

Question 4 Explanation: 
Three kinds of input are accepted by this algorithm- numbers, operators and new line characters.

Question 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
Data interpretation (DI) Questions answers

Question 5 Explanation: 
Precedence is a very important factor in determining the order of evaluation. If two operators have the same precedence, associativity comes into action.

There are 5 questions to complete.

 

 Buy/Download all MCQ Ebook >>>CLICK HERE<<<