# [Type B] Chapter – 10 Class 12 CS – Sumita Arora Assignment | Q/A

Here is class 12 computer science Unit 10 [Section B] solutions for Sumita Arora back exercise assignment. Below includes both textual and video solutions wherever required. View all the answers in assignment for chapter 10 and for all chapters here.

Watch all tutorials for chapter 10.

Q1: Translate following infix expression into its equivalent postfix expression:
( (A-B)*(D/E)/(F*G*H)
`Input String = ((A-B)*(D/E))/(F*G*H)`
Q2: Translate following infix expression into its equivalent postfix expression :
(A+B↑D)/(E-F)+G
`Input String = (A+B^D)/(E-F)+G`
Q3: Translate following infix expression into its equivalent postfix expression :
A*(B+D)/E-F-(G+H/K)
`Input String = A*(B+D)/E-F-(G+H/K)`
Q4: Write the equivalent infix expression for
10,3,*,7,1,-,*,23,+

Q5: Write the equivalent infix expression for a,b,AND,a,c,AND,OR

Q6: Consider the arithmetic expression P, written in postfix notation:
12,7,3,-,/,2,1,5,+,*,+
(a) Translate P, into its equivalent infix expression.
(b) Evaluate the infix expression.

Q7: Convert the following infix notation of expression to an equivalent postfix notation of expression (Show status of the stack after the execution of each operation) :(A+B)*C-D / E
`Input string: (A+B)*C-D / E`
Q8: Consider each of the following postfix expressions:
P1: 5,3,+,2,*,6,9,7,-,/-
P2: 3,5,+,6,4,-,*,4,1,-,2,↑,+
P3:3,1,+,2,↑,7,4,-,2,*,+,5,-
Translate each expression into infix notation and then evaluate
`Input expression = 5,3,+,2,*,6,9,7,-,/-`
`P2: 3,5,+,6,4,-,*,4,1,-,2,↑,+`
`P3 : 3,1,+,2,↑,7,4,-,2,*,+,5,-`
Q9: Give postfix form of the following expression :
A*(B+(C+D)*(E+F) /G)*H
`Input String = A*(B+(C+D)*(E+F) /G)*H`
Q10: Give postfix form for A+{ (B+C)+(D+E)*F}/G
`Input string = A+{(B+C)+(D+E)*F}/G`
Q11: Give postfix form of expression for the following
(i) NOT A OR NOT B AND NOT C
(ii)NOT (A OR B) AND C
```Order  NOT>AND>OR
(i) NOT A OR NOT B AND NOT C```
`(ii)NOT (A OR B) AND C`
Q12: Evaluate the following postfix notation of expression:
True, False, NOT, AND, True, True, AND, OR
`Order NOT>AND>OR`
Q13: Evaluate the following postfix expression using a stack and show the contents of the stack after execution of each operation 5,11, -,6,8,+,12,*, /
`5,11, -,6,8,+,12,*, /`
Q14: Let P be the postfix arithmetic expression : 7,2,-,1,14,-,1,2,* Evaluate P using stack and showing the status of the stack at every step.
```7,2,-,1,14,-,1,2,*

Incomplete question for the final evaluation as operator are missing.```
Q15: Consider the infix expression:
Q:A+B*C↑(D/E)/F.
Translate Q into P, where P is the postfix equivalent expression of Q, what will be the result of Q if this expression is evaluated for A,B,C,D,E,F as 2,3,2,7,2,2 respectively.
`Q : A+B*C^(D/E)/F`
Q16: Write equivalent Postfix expressions for the infix expressions given below :
(i) A+B-D/X    (ii) (X+Y)/(2*Y)-R
```(i) A B + D X / -
(ii)X Y + 2 Y * / R -```
Q17: Evaluate the following postfix notation of expression: 10  20+25  15-*30/
`10  20+25  15-*30/`
Q18: Evaluate the following postfix notation of expression: 20  10+5  2*-10/
```20  10+5  2*-10/
```
Q19: Evaluate the following postfix expression using a stack and show the contents of the stack after the execution of each operation :
120,45,20, +, 25,15,-,+,*
`120,45,20, +, 25,15,-,+,*`
Q20: Evaluate the following postfix expression using a stack and show the contents of stack after execution of each operation:
20,45,+,20,10,-,15,+,*
`20,45,+,20,10,-,15,+,*`
Q21: Use a stack to evaluate the following postfix expression and show the content of the stack after execution of each operation.  Don’t write any code.  Assume as if you are using push and pop member functions of the stack AB-CD+E*+
(where A=5,B=3,C=5,D=4,and E=2)
`5 3 - 5 4 + 2 * +`
Q22: Change the following infix expression into postfix expression.(A+B)*C+D/E-F
`postfix = A B + C * D E / + F -`
Q23: Evaluate the following postfix notation of expression :
(Show status of Stack after each operation)
True, False, NOT,OR,False,True,OR,AND
```ORDER OF OPERATOR  NOT>AND>OR

True, False, NOT, OR, False, True, OR, AND
```
Q24: Convert the following infix expression to its equivalent postfix expression showing stack contents for the conversion :
X-Y/(Z+U)=V
`X-Y/(Z+U)=V`
Q25: Convert the following infix expression to its equivalent postfix expression showing stack contents for the conversion :
A+B*(C-D )/ E
`A+B*(C-D )/ E`

Clear Doubts with Computer Tutor
In case you’re facing problems in understanding concepts, writing programs, solving questions, want to learn fun facts | tips | tricks or absolutely anything around computer science, feel free to join CTs learner-teacher community: students.computertutor.in