1
GATE CSE 2004
MCQ (Single Correct Answer)
+2
-0.6

Consider the grammar with the following translation rules and E as the start symbol.

$$\eqalign{ & E \to {E_1}\# T\,\,\left\{ {E.value = {E_1}.value*T.value} \right\} \cr & \,\,\,\,\,\,\,\,\,\,\,\,\,\,|T\,\,\,\,\,\,\,\,\,\,\,\,\left\{ {E.value = T.value} \right\} \cr & T \to {T_1}\& F\,\,\,\left\{ {T.value = {T_1}.value*F.value} \right\} \cr & \,\,\,\,\,\,\,\,\,\,\,\,\,\,|\,F\,\,\,\,\,\,\,\,\,\,\,\left\{ {T.value = F.value} \right\} \cr & F \to num\,\,\,\,\,\,\,\left\{ {F.value = num.value} \right\} \cr} $$

Compute E.value for the root of the parse tree for the expression:
2 # 3 & 5 # 6 & 4.

A
200
B
180
C
160
D
40
2
GATE CSE 2004
MCQ (Single Correct Answer)
+1
-0.3
Consider the grammar rule $$E \to {E_1} - {E_2}$$ for arithmetic expressions. The code generated is targeted to a CPU having a single user register. The subtraction operation requires the first operand to be in the register. If E1 and E2 do not have any common sub-expression, in order to get the shortest possible code.
A
E1 should be evaluated first
B
E2 should be evaluated first
C
Evaluation of E1 and E2 should necessarily be interleaved
D
Order to evaluation of E1 and E2 is of no consequence
3
GATE CSE 2004
MCQ (Single Correct Answer)
+1
-0.3
Choose the best matching between Group 1 and Group 2 :

Group –1

P. Data link layer
Q. Network layer
R. Transport layer

Group – 2

1. Ensures reliable transport of data over a physical point-to-point link
2. Encodes/decodes data for physical transimission
3. Allows end-to-end communication between two processes
4. Routes data from one network node to the next
A
P – 1, Q – 4, R - 3
B
P – 2, Q – 4, R - 1
C
P – 2, Q – 3, R - 1
D
P – 1, Q – 3, R - 2
4
GATE CSE 2004
MCQ (Single Correct Answer)
+2
-0.6
A and B are the only two stations on an Ethernet. Each has a steady queue of frames to send. Both A and B attempt to transmit a frame, collide, and A wins the first backoff race. At the end of this successful transmission by A, both A and B attempt to transmit and collide. The probability that A wins the second backoff race is
A
0.5
B
0.625
C
0.75
D
1.0
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12