1
GATE CSE 2018
MCQ (Single Correct Answer)
+2
-0.6
Consider the following parse tree for the expression $$a \ne b\$ c\$ d \ne e \ne f,$$ involving two binary operators $$\$ $$ and $$ \ne $$. GATE CSE 2018 Compiler Design - Parsing Question 17 English

Which one of the following is correct for the given parse tree?

A
$$\$ $$ has higher precedence and is left associative; $$ \ne $$ is right associative
B
$$ \ne $$ has higher precedence and is left associative; $$\$ $$ is right associativ
C
$$\$ $$ has higher precedence and is left associative; $$ \ne $$ is left associative
D
$$ \ne $$ has higher precedence and is right associative; $$\$ $$ is left associative
2
GATE CSE 2016 Set 2
MCQ (Single Correct Answer)
+2
-0.6
A student wrote two context-free grammars G1 and G2 for generating a single $$C$$-like array declaration. The dimension of the array is at least one. For example, $$${\mathop{\rm int}} \,\,\,\,\,\,\,a[10]\,\,[3];$$$

The grammars use D as the start symbol, and use six terminal symbols int ; id [ ] num.

Grammar G1 Grammar G2
D → intL; D → intL;
L → id[E L → idE
E → num E → E[num]
E → num][E E → [num]

Which of the grammars correctly generate the declaration mentioned above?

A
Both G1 and G2
B
Only G1
C
Only G2
D
Neither G1 nor G2
3
GATE CSE 2016 Set 1
Numerical
+2
-0
The attributes of three arithmetic operators in some programming language are given below.

Operator Precedence Associativity Arity
+ High Left Binary
_ Medium Right Binary
* Low Left Binary

The value of the expression $$2 - 5 + 1 - 7 * 3$$ in this language is _______________.

Your input ____
4
GATE CSE 2015 Set 3
MCQ (Single Correct Answer)
+2
-0.6
Consider the following grammar $$G$$

$$\eqalign{ & \,\,\,\,\,\,\,S \to \,\,\,\,\,\,\,F|H \cr & \,\,\,\,\,\,F \to \,\,\,\,\,\,\,p|c \cr & \,\,\,\,\,\,H \to \,\,\,\,\,\,\,d|c \cr} $$

where $$S, F$$ and $$H$$ are non-terminal symbols, $$p, d,$$ and $$c$$ are terminal symbols. Which of the following statement(s) is/are correct?

$$\,\,\,\,\,\,\,S1.\,\,\,\,\,\,\,LL\left( 1 \right)\,\,$$ can parse all strings that are generated using grammar $$G$$
$$\,\,\,\,\,\,\,S2.\,\,\,\,\,\,\,LR\left( 1 \right)\,\,$$ can parse all strings that are generated using grammar $$G$$

A
Only $$S1$$
B
Only $$S2$$
C
both $$S1$$ and $$S2$$
D
Neither $$S1$$ nor $$S2$$
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12