TCS
Company
Programming
Puzzles
Find Prefix and Postfix for the below Infix problem statement:
Infix Expression: 11 + 20/5* (20 - 15)^6^5
A. Prefix Expression: 11 20 15 20 5 - ^^*6 5/+
Postfix Expression: +20 / 11 * 5 - 20 ^^15 6 5
B. Prefix Expression: 11 20 5 20 15 - 6 5^^*/+
Postfix Expression: +11 / 20 * 5^^ - 20 15 6 5
C. Prefix Expression: 11 20 5 20 15 - ^^*/+6 5
Postfix Expression: +11 /^^-20 * 5 20 15 6 5
D. Prefix Expression: +11/20 * 5^^ - 20 15 6 5
Postfix Expression: 11 20 5 20 15 - 6 5^^*/+
Read Solution (Total 5)
-
- Pls tell this answer
- 2 years agoHelpfull: Yes(1) No(2)
- Prefix :
11 + 20 / 5 * - 20 15 ^ 6 ^ 5
11 + 20 / 5 * ^ - 20 15 6 ^ 5
11 + 20 / 5 * ^ ^ - 20 15 6 5
11 + 20 / * 5 ^ ^ - 20 15 6 5
11 + / 20 * 5 ^ ^ - 20 15 6 5
+ 11 / 20 * 5 ^ ^ - 20 15 6 5
Postfix:
11 + 20 / 5 * 20 15 - ^ 6 ^ 5
11 + 20 / 5 * 20 15 - ^ 6 5 ^
11 + 20 / 5 * 20 15 - 6 5 ^ ^
11 + 20 / 5 20 15 - 6 5 ^ ^ *
11 + 20 5 20 15 - 6 5 ^ ^ * /
11 20 5 20 15 - 6 5 ^ ^ * / +
So, the answer is option D. - 2 years agoHelpfull: Yes(1) No(1)
- correct ans is option :D. Prefix Expression: +11/20 * 5^^ - 20 15 6 5
Postfix Expression: 11 20 5 20 15 - 6 5^^*/+ - 2 years agoHelpfull: Yes(0) No(1)
- I think based on order of precedence is considered ^^>*>/>+- prefix
Postfix- ->/>*>^^ - 2 years agoHelpfull: Yes(0) No(1)
- https://brainly.in/question/39825991
here is the solution - 1 year agoHelpfull: Yes(0) No(1)
TCS Other Question