MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What would be the Prefix notation for the given equation:A+(B*C)
A
+A*CB
B
*B+AC
C
+A*BC
D
*A+CB
Explanation: 

Detailed explanation-1: -A + B * C would be written as + A * B C in prefix. The multiplication operator comes immediately before the operands B and C, denoting that * has precedence over +. The addition operator then appears before the A and the result of the multiplication. In postfix, the expression would be A B C * +.

Detailed explanation-2: -Explanation: The infix notation of the given prefix notation is 5+10/5-5 which gives us 2 as our answer. 2. What would be the solution to the given prefix notation? Explanation: The infix notation to the given prefix notation is 16/4/2/1 which gives us 2 as our answer.

Detailed explanation-3: -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-4: -The prefix form of A-B/ (C * D ^ E) is?-A/B*C^DE. Thus prefix expression is-A/B*C^DE. 8.

There is 1 question to complete.