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

Consider the following grammar:

$$\eqalign{ & S \to FR \cr & R \to *S\,|\,\varepsilon \cr & F \to id \cr} $$

In the predictive parser table, M, of the grammar the entries $$M\left[ {S,id} \right]$$ and $$M\left[ {R,\$ } \right]$$ respectively.

A
$$\left\{ {S \to FR} \right\}$$ and $$\left\{ {R \to \varepsilon } \right\}$$
B
$$\left\{ {S \to FR} \right\}$$ and $$\left\{ {\,\,} \right\}$$
C
$$\left\{ {S \to FR} \right\}$$ and $$\left\{ {R \to * S} \right\}$$
D
$$\left\{ {F \to id} \right\}$$ and $$\left\{ {R \to \varepsilon } \right\}$$
2
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6

Consider the following translation scheme.

$$\eqalign{ & S \to ER \cr & R \to *E\left\{ {pr{\mathop{\rm int}} ('*');} \right\}R\,|\,\varepsilon \cr & E \to F + E\left\{ {pr{\mathop{\rm int}} (' + ');} \right\}\,|\,F \cr & F \to S\,|\,id\,\left\{ {pr{\mathop{\rm int}} (id.value);} \right\} \cr} $$

Here id is a token that represents an integer and id.value represents the corresponding integer value. For an input '2 * 3 + 4' this translation scheme prints

A
2 * 3 + 4
B
2 * + 3 4
C
2 3 * 4 +
D
2 3 4 + *
3
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
Consider the following C code segment.
for (i = 0; i < n; i++) 
  { 
      for (j=0; j < n; j++) 
      { 
          if (i%2) 
          { 
           x += (4*j + 5*i); 
           y += (7 + 4*j); 
          } 
       } 
  } 
Which one of the following is false?
A
The code contains loop invariant computation
B
There is scope of common sub-expression elimination in this code
C
There is scope of strength reduction in this code
D
There is scope of dead code elimination in this code
4
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
Consider the diagram shown below where a number of LANs are connected by (transparent) bridges. In order to avoid packets looping through circuits in the graph, the bridges organize themselves in a spanning tree. First, the root bridge is identified as the bridge with the least serial number. Next, the root sends out (one or more) data units to enable the setting up of the spanning tree of shortest paths from the root bridge to each bridge. Each bridge identifies a port (the root port) through which it will forward frames to the root bridge. Port conflicts are always resolved in favour of the port with the lower index value. When there is a possibility of multiple bridges forwarding to the same LAN (but not through the root port), ties are broken as follows: bridges closest to the root get preference and between such bridges, the one with the lowest serial number is preferred. GATE CSE 2006 Computer Networks - Lan Technologies and Wi-Fi Question 9 English Consider the correct spanning tree for the previous question. Let host H1 send out a broadcast ping packet. Which of the following options represents the correct forwarding table on B3?
A
GATE CSE 2006 Computer Networks - Lan Technologies and Wi-Fi Question 9 English Option 1
B
GATE CSE 2006 Computer Networks - Lan Technologies and Wi-Fi Question 9 English Option 2
C
GATE CSE 2006 Computer Networks - Lan Technologies and Wi-Fi Question 9 English Option 3
D
GATE CSE 2006 Computer Networks - Lan Technologies and Wi-Fi Question 9 English Option 4
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12