1
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+2
-0.6
Consider the following C function.
int fun1 (int n) { 
     int i, j, k, p, q = 0; 
     for (i = 1; i < n; ++i) 
     {
        p = 0; 
       for (j = n; j > 1; j = j/2) 
           ++p;  
       for (k = 1; k < p; k = k * 2) 
           ++q;
     } 
     return q;
}
Which one of the following most closely approximates the return value of the function fun1?
A
$$n^3$$
B
$$n{\left( {\log n} \right)^2}$$
C
$$n\log n$$
D
$$n\log \left( {\log n} \right)$$
2
GATE CSE 2015 Set 1
Numerical
+2
-0
The graph shown below has 8 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 36 and contains the edges: {(A, C), (B, C), (B, E), (E, F), (D, F)}. The edge weights of only those edges which are in the MST are given in the figure shown below. The minimum possible sum of weights of all 8 edges of this graph is ___________. GATE CSE 2015 Set 1 Algorithms - Greedy Method Question 11 English
Your input ____
3
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+1
-0.3
Which one of the following is TRUE at any valid state in shift-reduce parsing?
A
Viable prefixes appear only at the bottom of the stack and not inside
B
Viable prefixes appear only at the top of the stack and not inside
C
The stack contains only a set of viable prefixes
D
The stack never contains viable prefixes
4
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+2
-0.6
A variable x is said to be live at a statement $${S_i}$$ in a programif the following three conditions hold simultaneously:

i. There exists a statement $${S_j}$$ that uses x
ii. There is a path from $${S_i}$$ to $${S_j}$$ in the flow graph corresponding to the program
iii. The path has no intervening assignment to x including at $${S_i}$$ and $${S_j}$$

GATE CSE 2015 Set 1 Compiler Design - Code Generation and Optimization Question 6 English

The variables which are live both at the statement in basic block 2 and at the statement in basic block 3 of the above control flow graph are

A
p, s, u
B
r, s, u
C
r, u
D
q, v
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