COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
(a+b)*(c+d)
|
|
ab+c*
|
|
+ab
|
|
abc+*
|
Detailed explanation-1: -Which of the following is an infix expression? Explanation: (a+b)*(c+d) is an infix expression. +ab is a prefix expression and ab+c* is a postfix expression.
Detailed explanation-2: -Solutions for The postfix expression for the infix expression: A + B* (C + D) /F + D * E is:a)AB + CD + *F /D + E*b)ABCD + *F /+ DE* +c)A*B+ CD ? F*DE ++d)F*DE ++Correct answer is option ‘B’.
Detailed explanation-3: -Infix: The typical mathematical form of expression that we encounter generally is known as infix notation. In infix form, an operator is written in between two operands. For example: An expression in the form of A * ( B + C ) / D is in infix form.
Detailed explanation-4: -Now consider the infix expression (A + B) * C. Recall that in this case, infix requires the parentheses to force the performance of the addition before the multiplication. However, when A + B was written in prefix, the addition operator was simply moved before the operands, + A B.