Subjects in this paper

GATE CS 2012 CS questions

Q1

Discrete MathematicsMCQ1 mark−1/3 if wrong
Consider the following logical inferences.

I1I_1: If it rains then the cricket match will not be played.
The cricket match was played.
Inference: There was no rain.

I2I_2: If it rains then the cricket match will not be played.
It did not rain.
Inference: The cricket match was played.

Which of the following is TRUE?
Show answer without attempting

Answer: B

Q2

Relational DesignMCQ1 mark−1/3 if wrong
Which of the following is TRUE?
Show answer without attempting

Answer: C

Q3

C ProgrammingMCQ1 mark−1/3 if wrong
What will be the output of the following C program segment?
char inChar = 'A' ;
switch ( inChar ) {
case 'A' : printf ("Choice A\ n") ;
case 'B' :
case 'C' : printf ("Choice B") ;
case 'D' :
case 'E' :
default  : printf ( " No Choice" ) ; }
Show answer without attempting

Answer: Marks to all

Q4

ComputabilityMCQ1 mark−1/3 if wrong
Assuming P≠NPP \neq NP, which of the following is TRUE?
Show answer without attempting

Answer: B

Q5

Tree Data StructuresMCQ1 mark−1/3 if wrong
The worst case running time to search for an element in a balanced binary search tree with n2nn2^n elements is
Show answer without attempting

Answer: C

Q6

Boolean Algebra and MinimizationMCQ1 mark−1/3 if wrong
The truth table
XYf(X, Y)
000
010
101
111
represents the Boolean function
Show answer without attempting

Answer: A

Q7

Number Representation and ArithmeticMCQ1 mark−1/3 if wrong
The decimal value 0.5 in IEEE single precision floating point representation has
Show answer without attempting

Answer: B

Q8

Processes and ThreadsMCQ1 mark−1/3 if wrong
A process executes the code
fork();
fork();
fork();
The total number of child processes created is
Show answer without attempting

Answer: C

Q9

CalculusMCQ1 mark−1/3 if wrong
Consider the function f(x)=sin⁡(x)f(x) = \sin(x) in the interval x∈[π/4,7π/4]x \in [\pi/4, 7\pi/4]. The number and location(s) of the local minima of this function are
Show answer without attempting

Answer: D

Q10

Application LayerMCQ1 mark−1/3 if wrong
The protocol data unit (PDU) for the application layer in the Internet stack is
Show answer without attempting

Answer: C

Q11

Linear AlgebraMCQ1 mark−1/3 if wrong
Let AA be the 2×22 \times 2 matrix with elements a11=a12=a21=+1a_{11} = a_{12} = a_{21} = +1 and a22=−1a_{22} = -1. Then the eigenvalues of the matrix A19A^{19} are
Show answer without attempting

Answer: D

Q12

Regular LanguagesMCQ1 mark−1/3 if wrong
What is the complement of the language accepted by the NFA shown below?
Assume Σ={a}\Sigma = \{a\} and ϵ\epsilon is the empty string.

(In the figure, the edge label printed as η denotes ϵ\epsilon.)
Question figure
Show answer without attempting

Answer: B

Q13

Discrete MathematicsMCQ1 mark−1/3 if wrong
What is the correct translation of the following statement into mathematical logic?
"Some real numbers are rational"
Show answer without attempting

Answer: C

Q14

Data ModelsMCQ1 mark−1/3 if wrong
Given the basic ER and relational models, which of the following is INCORRECT?
Show answer without attempting

Answer: C

Q15

Relational QueriesMCQ1 mark−1/3 if wrong
Which of the following statements are TRUE about an SQL query?

P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause
Q : An SQL query can contain a HAVING clause only if it has a GROUP BY clause
R : All attributes used in the GROUP BY clause must appear in the SELECT clause
S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause
Show answer without attempting

Answer: C

Q16

RecursionMCQ1 mark−1/3 if wrong
The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with nn discs is
Show answer without attempting

Answer: D

Q17

Discrete MathematicsMCQ1 mark−1/3 if wrong
Let G be a simple undirected planar graph on 10 vertices with 15 edges. If G is a connected graph, then the number of bounded faces in any embedding of G on the plane is equal to
Show answer without attempting

Answer: D

Q18

Algorithm AnalysisMCQ1 mark−1/3 if wrong
Let W(n)W(n) and A(n)A(n) denote respectively, the worst case and average case running time of an algorithm executed on an input of size nn. Which of the following is ALWAYS TRUE?
Show answer without attempting

Answer: C

Q19

Combinational CircuitsMCQ1 mark−1/3 if wrong
The amount of ROM needed to implement a 4 bit multiplier is
Show answer without attempting

Answer: D

Q20

Instruction PipeliningMCQ1 mark−1/3 if wrong
Register renaming is done in pipelined processors
Show answer without attempting

Answer: C

Q21

Probability and StatisticsMCQ1 mark−1/3 if wrong
Consider a random variable XX that takes values +1+1 and −1-1 with probability 0.5 each. The values of the cumulative distribution function F(x)F(x) at x=−1x = -1 and +1+1 are
Show answer without attempting

Answer: C

Q22

Transport LayerMCQ1 mark−1/3 if wrong
Which of the following transport layer protocols is used to support electronic mail?
Show answer without attempting

Answer: C

Q23

IPv4MCQ1 mark−1/3 if wrong
In the IPv4 addressing format, the number of networks allowed under Class C addresses is
Show answer without attempting

Answer: C

Q24

ComputabilityMCQ1 mark−1/3 if wrong
Which of the following problems are decidable?

1) Does a given program ever produce an output?
2) If LL is a context-free language, then, is L‾\overline{L} also context-free?
3) If LL is a regular language, then, is L‾\overline{L} also regular?
4) If LL is a recursive language, then, is L‾\overline{L} also recursive?
Show answer without attempting

Answer: D

Q25

Regular LanguagesMCQ1 mark−1/3 if wrong
Given the language L={ab,aa,baa}L = \{ab, aa, baa\}, which of the following strings are in L∗L^*?

1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
Show answer without attempting

Answer: C

Q26

Discrete MathematicsMCQ2 marks−2/3 if wrong
Which of the following graphs is isomorphic to the graph shown in the figure?
Question figure
Show answer without attempting

Answer: B

Q27

TransactionsMCQ2 marks−2/3 if wrong
Consider the following transactions with data items P and Q initialized to zero:
T1 : read (P);
     read (Q);
     if P = 0 then Q := Q + 1 ;
     write (Q).

T2 : read (Q);
     read (P);
     if Q = 0 then P := P + 1 ;
     write (P).
Any non-serial interleaving of T1T_1 and T2T_2 for concurrent execution leads to
Show answer without attempting

Answer: B

Q28

CalculusMCQ2 marks−2/3 if wrong
The bisection method is applied to compute a zero of the function f(x)=x4−x3−x2−4f(x) = x^4 - x^3 - x^2 - 4 in the interval [1,9][1, 9]. The method converges to a solution after ______ iterations.
Show answer without attempting

Answer: B

Q29

Graph AlgorithmsMCQ2 marks−2/3 if wrong
Let GG be a weighted graph with edge weights greater than one and G′G' be the graph constructed by squaring the weights of edges in GG. Let TT and T′T' be the minimum spanning trees of GG and G′G', respectively, with total weights tt and t′t'. Which of the following statements is TRUE?
Show answer without attempting

Answer: Marks to all

Q30

Boolean Algebra and MinimizationMCQ2 marks−2/3 if wrong
What is the minimal form of the Karnaugh map shown below? Assume that X denotes a don't care term.
cd \ ab00011110
001XX1
01X1
11
101X
Show answer without attempting

Answer: B

Q31

SchedulingMCQ2 marks−2/3 if wrong
Consider the 3 processes, P1, P2 and P3 shown in the table.
ProcessArrival timeTime Units Required
P105
P217
P334
The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are
Show answer without attempting

Answer: C

Q32

Concurrency and SynchronizationMCQ2 marks−2/3 if wrong
Fetch_And_Add(X,i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used in the pseudocode shown below to implement a busy-wait lock. L is an unsigned integer shared variable initialized to 0. The value of 0 corresponds to lock being available, while any non-zero value corresponds to the lock being not available.
AcquireLock(L){
      while (Fetch_And_Add(L,1))
            L = 1;
}

ReleaseLock(L){
      L = 0;
}
This implementation
Show answer without attempting

Answer: B

Q33

Probability and StatisticsMCQ2 marks−2/3 if wrong
Suppose a fair six-sided die is rolled once. If the value on the die is 1, 2, or 3, the die is rolled a second time. What is the probability that the sum total of values that turn up is at least 6?
Show answer without attempting

Answer: B

Q34

IPv4MCQ2 marks−2/3 if wrong
An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: 245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?
Show answer without attempting

Answer: A

Q35

Linear Data StructuresMCQ2 marks−2/3 if wrong
Suppose a circular queue of capacity (n−1)(n - 1) elements is implemented with an array of nn elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are
Show answer without attempting

Answer: A

Q36

Runtime EnvironmentsMCQ2 marks−2/3 if wrong
Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted.
Program main;
   Var ...

   Procedure A1;
      Var ...
      Call A2;
   End A1

   Procedure A2;
      Var ...

      Procedure A21;
         Var ...
         Call A1;
      End A21

      Call A21;
   End A2

   Call A1;
End main.
Consider the calling chain: Main →\rightarrow A1 →\rightarrow A2 →\rightarrow A21 →\rightarrow A1

The correct set of activation records along with their access links is given by
Show answer without attempting

Answer: D

Q37

Discrete MathematicsMCQ2 marks−2/3 if wrong
How many onto (or surjective) functions are there from an nn-element (n≥2)(n \geq 2) set to a 2-element set?
Show answer without attempting

Answer: C

Q38

Discrete MathematicsMCQ2 marks−2/3 if wrong
Let G be a complete undirected graph on 6 vertices. If vertices of G are labeled, then the number of distinct cycles of length 4 in G is equal to
Show answer without attempting

Answer: Marks to all

Q39

Searching Sorting and HashingMCQ2 marks−2/3 if wrong
A list of nn strings, each of length nn, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is
Show answer without attempting

Answer: Marks to all

Q40

Graph AlgorithmsMCQ2 marks−2/3 if wrong
Consider the directed graph shown in the figure below. There are multiple shortest paths between vertices S and T. Which one will be reported by Dijkstra's shortest path algorithm? Assume that, in any iteration, the shortest path to a vertex vv is updated only when a strictly shorter path to vv is discovered.
Question figure
Show answer without attempting

Answer: D

Q41

File SystemsMCQ2 marks−2/3 if wrong
A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is
Show answer without attempting

Answer: B

Q42

Memory ManagementMCQ2 marks−2/3 if wrong
Consider the virtual page reference string
1, 2, 3, 2, 4, 1, 3, 2, 4, 1
on a demand paged virtual memory system running on a computer system that has main memory size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacement policy. Then
Show answer without attempting

Answer: B

Q43

Relational DesignMCQ2 marks−2/3 if wrong
Suppose R1(A‾,B)R_1(\underline{A}, B) and R2(C‾,D)R_2(\underline{C}, D) are two relation schemas. Let r1r_1 and r2r_2 be the corresponding relation instances. B is a foreign key that refers to C in R2R_2. If data in r1r_1 and r2r_2 satisfy referential integrity constraints, which of the following is ALWAYS TRUE?
Show answer without attempting

Answer: A

Q44

Layering and SwitchingMCQ2 marks−2/3 if wrong
Consider a source computer (S) transmitting a file of size 10610^6 bits to a destination computer (D) over a network of two routers (R1R_1 and R2R_2) and three links (L1L_1, L2L_2, and L3L_3). L1L_1 connects S to R1R_1; L2L_2 connects R1R_1 to R2R_2; and L3L_3 connects R2R_2 to D. Let each link be of length 100 km. Assume signals travel over each link at a speed of 10810^8 meters per second. Assume that the link bandwidth on each link is 1Mbps. Let the file be broken down into 1000 packets each of size 1000 bits. Find the total sum of transmission and propagation delays in transmitting the file from S to D?
Show answer without attempting

Answer: A

Q45

Transport LayerMCQ2 marks−2/3 if wrong
Consider an instance of TCP's Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission.
Show answer without attempting

Answer: Marks to all

Q46

Regular LanguagesMCQ2 marks−2/3 if wrong
Consider the set of strings on {0,1}\{0,1\} in which, every substring of 3 symbols has at most two zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially completed DFA that accepts this language is shown below.

(In the figure, the start state printed as η is the state for the empty string ϵ\epsilon.)

The missing arcs in the DFA are
Question figure
Show answer without attempting

Answer: D

Q47

Tree Data StructuresMCQ2 marks−2/3 if wrong
The height of a tree is defined as the number of edges on the longest path in the tree. The function shown in the pseudocode below is invoked as height(root) to compute the height of a binary tree rooted at the tree pointer root.
int height (treeptr n)
{ if (n == NULL) return -1;
  if (n -> left == NULL)
      if (n -> right == NULL) return 0;

      else return [B1] ;                // Box 1

  else { h1 = height (n -> left);
         if (n -> right == NULL) return (1+h1);
         else { h2 = height (n -> right);

                return [B2] ;           // Box 2
              }
       }
}
The appropriate expressions for the two boxes B1 and B2 are
Show answer without attempting

Answer: A

Q48

C ProgrammingMCQ2 marks−2/3 if wrong
What output will be generated by the given code segment?
Show answer without attempting

Answer: C

Q49

C ProgrammingMCQ2 marks−2/3 if wrong
What output will be generated by the given code segment if:
Line 1 is replaced by auto int a = 1;
Line 2 is replaced by register int a = 2;
Show answer without attempting

Answer: D

Q50

Relational QueriesMCQ2 marks−2/3 if wrong
How many tuples does the result of the following relational algebra expression contain? Assume that the schema of A∪BA \cup B is the same as that of AA.

(A∪B)⋈A.Id>40∨C.Id<15C(A \cup B) \bowtie_{A.Id > 40 \lor C.Id < 15} C
Show answer without attempting

Answer: A

Q51

Relational QueriesMCQ2 marks−2/3 if wrong
How many tuples does the result of the following SQL query contain?
SELECT A.Id
FROM A
WHERE A.Age > ALL (SELECT B.Age
                   FROM B
                   WHERE B.Name = 'Arun')
Show answer without attempting

Answer: B

Q52

ParsingMCQ2 marks−2/3 if wrong
The FIRST and FOLLOW sets for the non-terminals A and B are
Show answer without attempting

Answer: A

Q53

ParsingMCQ2 marks
The appropriate entries for E1, E2, and E3 are
Show answer without attempting

Answer: C

Q54

Memory HierarchyMCQ2 marks−2/3 if wrong
The number of bits in the tag field of an address is
Show answer without attempting

Answer: C

Q55

Memory HierarchyMCQ2 marks
The size of the cache tag directory is
Show answer without attempting

Answer: A

Q56

Quantitative AptitudeMCQ1 mark−1/3 if wrong
The cost function for a product in a firm is given by 5q25q^2, where qq is the amount of production. The firm can sell the product at a market price of ₹50 per unit. The number of units to be produced by the firm such that the profit is maximized is
Show answer without attempting

Answer: A

Q57

Verbal AptitudeMCQ1 mark−1/3 if wrong
Choose the most appropriate alternative from the options given below to complete the following sentence:

Despite several ________ the mission succeeded in its attempt to resolve the conflict.
Show answer without attempting

Answer: B

Q58

Verbal AptitudeMCQ1 mark−1/3 if wrong
Which one of the following options is the closest in meaning to the word given below?

Mitigate
Show answer without attempting

Answer: A

Q59

Verbal AptitudeMCQ1 mark−1/3 if wrong
Choose the grammatically INCORRECT sentence:
Show answer without attempting

Answer: D

Q60

Verbal AptitudeMCQ1 mark−1/3 if wrong
Choose the most appropriate alternative from the options given below to complete the following sentence:

Suresh's dog is the one ________ was hurt in the stampede.
Show answer without attempting

Answer: Marks to all

Q61

Analytical AptitudeMCQ2 marks−2/3 if wrong
Wanted Temporary, Part-time persons for the post of Field Interviewer to conduct personal interviews to collect and collate economic data. Requirements: High School-pass, must be available for Day, Evening and Saturday work. Transportation paid, expenses reimbursed.

Which one of the following is the best inference from the above advertisement?
Show answer without attempting

Answer: D

Q62

Quantitative AptitudeMCQ2 marks−2/3 if wrong
A political party orders an arch for the entrance to the ground in which the annual convention is being held. The profile of the arch follows the equation y=2x−0.1x2y = 2x - 0.1x^2 where yy is the height of the arch in meters. The maximum possible height of the arch is
Show answer without attempting

Answer: B

Q63

Quantitative AptitudeMCQ2 marks−2/3 if wrong
An automobile plant contracted to buy shock absorbers from two suppliers X and Y. X supplies 60% and Y supplies 40% of the shock absorbers. All shock absorbers are subjected to a quality test. The ones that pass the quality test are considered reliable. Of X's shock absorbers, 96% are reliable. Of Y's shock absorbers, 72% are reliable.

The probability that a randomly chosen shock absorber, which is found to be reliable, is made by Y is
Show answer without attempting

Answer: B

Q64

Quantitative AptitudeMCQ2 marks−2/3 if wrong
Which of the following assertions are CORRECT?

P: Adding 7 to each entry in a list adds 7 to the mean of the list
Q: Adding 7 to each entry in a list adds 7 to the standard deviation of the list
R: Doubling each entry in a list doubles the mean of the list
S: Doubling each entry in a list leaves the standard deviation of the list unchanged
Show answer without attempting

Answer: C

Q65

Analytical AptitudeMCQ2 marks−2/3 if wrong
Given the sequence of terms, AD CG FK JP, the next term is
Show answer without attempting

Answer: A

0/650 correct0 marks

More GATE CS papers