1
GATE CSE 2010
MCQ (Single Correct Answer)
+2
-0.6
Consider a complete undirected graph with vertex set {0, 1, 2, 3, 4}. Entry W(ij) in the matrix W below is the weight of the edge {i, j}. $$$w = \left( {\matrix{ 0 & 1 & 8 & 1 & 4 \cr 1 & 0 & {12} & 4 & 9 \cr 8 & {12} & 0 & 7 & 3 \cr 1 & 4 & 7 & 0 & 2 \cr 4 & 9 & 3 & 2 & 0 \cr } } \right)$$$ What is the minimum possible weight of a path P from vertex 1 to vertex 2 in this graph such that P contains at most 3 edges?
A
7
B
8
C
9
D
10
2
GATE CSE 2010
MCQ (Single Correct Answer)
+2
-0.6

The program below uses six temporary variables a, b, c, d, e, f.

a = 1 
b = 10 
c = 20 
d = a + b 
e = c + d 
f = c + e 
b = c + e 
e = b + f 
d = 5 + e 
return d + f

Assuming that all operations take their operands from registers, what is the minimum number of registers needed to execute this program without spilling?

A
2
B
3
C
4
D
6
3
GATE CSE 2010
MCQ (Single Correct Answer)
+1
-0.3
Which data structure in a compiler is used for managing information about variables and their attributes?
A
Abstract syntax tree
B
Symbol table
C
Semantic stack
D
Parse table
4
GATE CSE 2010
MCQ (Single Correct Answer)
+2
-0.6
The grammar $$S \to aSa\,|\,\,bS\,|\,\,c$$ is
A
LL(1) but not LR(1)
B
LR(1) but not LR(1)
C
Both LL(1) and LR(1)
D
Neither LL(1) nor LR(1)
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