1
GATE CSE 2024 Set 2
MCQ (More than One Correct Answer)
+1
-0.33

Which of the following statements is/are FALSE?

A

An attribute grammar is a syntax-directed definition (SDD) in which the functions in the semantic rules have no side effects

B

The attributes in a L-attributed definition cannot always be evaluated in a depth-first order

C

Synthesized attributes can be evaluated by a bottom-up parser as the input is parsed

D

All L-attributed definitions based on LR(1) grammar can be evaluated using a bottom-up parsing strategy

2
GATE CSE 2024 Set 2
MCQ (Single Correct Answer)
+2
-0.66

Consider the following context-free grammar where the start symbol is S and the set of terminals is {a,b,c,d}.

$ S \rightarrow AaAb \mid BbBa $

$ A \rightarrow cS \mid \epsilon $

$ B \rightarrow dS \mid \epsilon $

The following is a partially-filled LL(1) parsing table.

abcd$
SS $\rightarrow$ AaAbS $\rightarrow$ BbBa(1)(2)
AA $\rightarrow \epsilon$(3)A $\rightarrow$ cS
B(4)B $\rightarrow \epsilon$B $\rightarrow$ dS

Which one of the following options represents the CORRECT combination for the numbered cells in the parsing table?

Note: In the options, “blank” denotes that the corresponding cell is empty.

A

(1) $ S \rightarrow AaAb $, (2) $ S \rightarrow BbBa $, (3) $ A \rightarrow \epsilon $, (4) $ B \rightarrow \epsilon $

B

(1) $ S \rightarrow BbBa $, (2) $ S \rightarrow AaAb $, (3) $ A \rightarrow \epsilon $, (4) $ B \rightarrow \epsilon $

C

(1) $ S \rightarrow AaAb $, (2) $ S \rightarrow BbBa $, (3) blank, (4) blank

D

(1) $ S \rightarrow BbBa $, (2) $ S \rightarrow AaAb $, (3) blank, (4) blank

3
GATE CSE 2024 Set 2
Numerical
+2
-0.66

Consider the following augmented grammar, which is to be parsed with a SLR parser. The set of terminals is $\{ a, b, c, d, \, \#, \, @ \}$

$S' \rightarrow S$
$S \rightarrow SS \;|\; Aa \;|\; bAc \;|\; Bc \;|\; bBa$
$A \rightarrow d\#\#$
$B \rightarrow @$

Let $I_0 = \text{CLOSURE}( \{ S' \rightarrow \bullet S \} )$. The number of items in the set $GOTO(I_0, \, S)$ is __________.

Your input ____
4
GATE CSE 2024 Set 2
MCQ (More than One Correct Answer)
+1
-0.33

Node X has a TCP connection open to node Y. The packets from X to Y go through an intermediate IP router R. Ethernet switch S is the first switch on the network path between X and R. Consider a packet sent from X to Y over this connection.

Which of the following statements is/are TRUE about the destination IP and MAC addresses on this packet at the time it leaves X?

A

The destination IP address is the IP address of R

B

The destination IP address is the IP address of Y

C

The destination MAC address is the MAC address of S

D

The destination MAC address is the MAC address of Y

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