...
NIC-NIELIT Scientist-B 2020
October 6, 2023
NTA UGC NET DEC-2022 Paper-1
October 6, 2023
NIC-NIELIT Scientist-B 2020
October 6, 2023
NTA UGC NET DEC-2022 Paper-1
October 6, 2023

UGC NET CS 2014 Dec-Paper-2

Question 8
How many PUSH and POP operations will be needed to evaluate the following expression by reverse polish notation in a stack machine (A * B) + (C * D/E) ?
A
4 PUSH and 3 POP instructions
B
5 PUSH and 4 POP instructions
C
6 PUSH and 2 POP instructions
D
5 PUSH and 3 POP instructions
Question 8 Explanation: 
Given infix notation, we have to change infix notation into postfix notation.
after converting postfix notation the notations are ab* cde /* +

Total 5 PUSH and 4 POP operations performed.
Correct Answer: B
Question 8 Explanation: 
Given infix notation, we have to change infix notation into postfix notation.
after converting postfix notation the notations are ab* cde /* +

Total 5 PUSH and 4 POP operations performed.

Leave a Reply

Your email address will not be published. Required fields are marked *