Data Structure Questions and Answers-Evaluation of an Infix Expression (Not Parenthesized)

 

 Help authour, Buy PDF Ebook   >>>Click Here<<<

Data Structure Questions and Answers-Evaluation of an Infix Expression (Not Parenthesized)

Click on any option to know the CORRECT ANSWERS

Question 11
Using the evaluation of infix expression, evaluate a^b+c and choose the correct answer. (a=2, b=2, c=2)
A
12
B
8
C
10
D
6
Visual arts Questions answers

Question 11 Explanation: 
^ has the highest precedence. Hence, 2^2 is evaluated and then 4+2 gives 6.

Question 12
Evaluate the following infix expression using algorithm and choose the correct answer. a+b*c-d/e^f where a=1, b=2, c=3, d=4, e=2, f=2.
A
6
B
8
C
9
D
7
Current affairs Questions answers

Question 12 Explanation: 
^ has the highest order of precedence. Hence, 2^2 is evaluated first, and then, 2*3 and 4/4 are evaluated. Therefore, 1+6-1=6.

Question 13
From the given expression tree, identify the infix expression, evaluate it and choose the correct result.
A
5
B
10
C
12
D
16
Management Questions answers

Question 13 Explanation: 
From the given expression tree, the result of the infix expression is evaluated to be 12.

There are 13 questions to complete.

 

 Download all FREE PDF Ebook >>>CLICK HERE<<<