Operating-Systems
October 8, 2023
NIC-NIELIT STA 2020
October 8, 2023
Operating-Systems
October 8, 2023
NIC-NIELIT STA 2020
October 8, 2023

Compiler-Design

Question 24

Given the following expression grammar:

    E → E * F | F + E | F
    F → F - F | id  

which of the following is true?

A
* has higher precedence than +
B
– has higher precedence than *
C
+ and – have same precedence
D
+ has higher precedence than *
Question 24 Explanation: 
The operator which is in low level that can have high preference.
Order of precedence is *, +, -.
Here * and + have equal preference, ‘-‘ can have higher precedence than + and *.
Correct Answer: B
Question 24 Explanation: 
The operator which is in low level that can have high preference.
Order of precedence is *, +, -.
Here * and + have equal preference, ‘-‘ can have higher precedence than + and *.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!