Question 1943 – Nielit STA 17-12-2017
December 10, 2023Question 1948 – Nielit STA 17-12-2017
December 10, 2023Question 5842 – Compiler-Design
Consider the following left associative operators in decreasing order of precedence :
– subtraction (highest precedence)
* multiplication
$ exponentiation (lowest precedence)
What is the result of the following expression ?
3 – 2 * 4 $ | * 2**3
Correct Answer: D
Question 277 Explanation:
Actually they are given in wrong order.
But according to given question, we are giving precedence is
(((3 – 2) *) 4 $ | * (2**3))
Step-1: 3-2=1
Step-2: 1*4=4
Step-3: 2*3=6
Step-4: 46=4096
Note: When we are assuming ** is single(*) and there is no |* are useless symbols.
But according to given question, we are giving precedence is
(((3 – 2) *) 4 $ | * (2**3))
Step-1: 3-2=1
Step-2: 1*4=4
Step-3: 2*3=6
Step-4: 46=4096
Note: When we are assuming ** is single(*) and there is no |* are useless symbols.
– 61
64
512
4096
Subscribe
Login
0 Comments