Question 13Asked in DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2

What is the polish notation of the given infix expression? (A * B + C) / (E − F * G)

What is the polish notation of the given infix expression? (A * B + C) / (E − F * G)
  1. A+*/ABCE*FG
  2. B/+* ABC-E*FG
  3. C/ABC+*-E*FG
  4. D+/ABC*-E*FG
Show answerHide answer

Correct answer: (B) /+* ABC-E*FG

Explanation

Polish notation is prefix notation. (A*B + C) becomes +*ABC and (E − F*G) becomes −E*FG. Dividing the first by the second gives /+*ABC−E*FG.

From DSSSB TGT Computer Science PYQ (Technical), 8 Aug 2021, Shift 2

This is question 13 of DSSSB TGT Computer Science PYQ (Technical), 8 Aug 2021, Shift 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.