Subjects in this paper

GATE CS 2014 CS-2 questions

Q1

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

India is a post-colonial country because
Show answer without attempting

Answer: A

Q2

Verbal AptitudeMCQ1 mark−1/3 if wrong
Who ___________ was coming to see us this evening?
Show answer without attempting

Answer: B

Q3

Verbal AptitudeMCQ1 mark−1/3 if wrong
Match the columns.
Column 1Column 2
1) eradicateP) misrepresent
2) distortQ) soak completely
3) saturateR) use
4) utilizeS) destroy utterly
Show answer without attempting

Answer: A

Q4

Quantitative AptitudeMCQ1 mark−1/3 if wrong
What is the average of all multiples of 10 from 2 to 198?
Show answer without attempting

Answer: B

Q5

Quantitative AptitudeMCQ1 mark−1/3 if wrong
The value of 12+12+12+⋯\sqrt{12 + \sqrt{12 + \sqrt{12 + \cdots}}} is
Show answer without attempting

Answer: C

Q6

Analytical AptitudeMCQ2 marks−2/3 if wrong
The old city of Koenigsberg, which had a German majority population before World War 2, is now called Kaliningrad. After the events of the war, Kaliningrad is now a Russian territory and has a predominantly Russian population. It is bordered by the Baltic Sea on the north and the countries of Poland to the south and west and Lithuania to the east respectively. Which of the statements below can be inferred from this passage?
Show answer without attempting

Answer: B

Q7

Analytical AptitudeMCQ2 marks−2/3 if wrong
The number of people diagnosed with dengue fever (contracted from the bite of a mosquito) in north India is twice the number diagnosed last year. Municipal authorities have concluded that measures to control the mosquito population have failed in this region.

Which one of the following statements, if true, does not‾\underline{\text{not}} contradict this conclusion?
Show answer without attempting

Answer: D

Q8

Quantitative AptitudeMCQ2 marks−2/3 if wrong
If xx is real and ∣x2−2x+3∣=11|x^2 - 2x + 3| = 11, then possible values of ∣−x3+x2−x∣|-x^3 + x^2 - x| include
Show answer without attempting

Answer: D

Q9

Quantitative AptitudeNAT2 marks
The ratio of male to female students in a college for five years is plotted in the following line graph. If the number of female students doubled in 2009, by what percent did the number of male students increase in 2009?
Question figure
Show answer without attempting

Answer: 140

Q10

Quantitative AptitudeMCQ2 marks−2/3 if wrong
At what time between 6 a.m. and 7 a.m. will the minute hand and hour hand of a clock make an angle closest to 60∘60^\circ?
Show answer without attempting

Answer: A

Q1

Probability and StatisticsNAT1 mark
The security system at an IT office is composed of 10 computers of which exactly four are working. To check whether the system is functional, the officials inspect four of the computers picked at random (without replacement). The system is deemed functional if at least three of the four computers inspected are working. Let the probability that the system is deemed functional be denoted by pp. Then 100p100p = _____________.
Show answer without attempting

Answer: 11.85 to 11.95

Q2

Probability and StatisticsNAT1 mark
Each of the nine words in the sentence "The quick brown fox jumps over the lazy dog" is written on a separate piece of paper. These nine pieces of paper are kept in a box. One of the pieces is drawn at random from the box. The expected length of the word drawn is _____________. (The answer should be rounded to one decimal place.)
Show answer without attempting

Answer: 3.8 to 3.9

Q3

Discrete MathematicsNAT1 mark
The maximum number of edges in a bipartite graph on 12 vertices is __________.
Show answer without attempting

Answer: 36

Q4

Linear AlgebraNAT1 mark
If the matrix AA is such that

A=[2−47][195]A = \begin{bmatrix} 2 \\ -4 \\ 7 \end{bmatrix} \begin{bmatrix} 1 & 9 & 5 \end{bmatrix}

then the determinant of AA is equal to ______.
Show answer without attempting

Answer: 0

Q5

CalculusMCQ1 mark−1/3 if wrong
A non-zero polynomial f(x)f(x) of degree 3 has roots at x=1x = 1, x=2x = 2 and x=3x = 3. Which one of the following must be TRUE?
Show answer without attempting

Answer: A

Q6

Boolean Algebra and MinimizationMCQ1 mark−1/3 if wrong
The dual of a Boolean function F(x1,x2,…,xn,+,⋅,′)F(x_1, x_2, \ldots, x_n, +, \cdot, '), written as FDF^D, is the same expression as that of FF with ++ and ⋅\cdot swapped. FF is said to be self-dual if F=FDF = F^D. The number of self-dual functions with nn Boolean variables is
Show answer without attempting

Answer: D

Q7

Sequential CircuitsMCQ1 mark−1/3 if wrong
Let k=2nk = 2^n. A circuit is built by giving the output of an nn-bit binary counter as input to an nn-to-2n2^n bit decoder. This circuit is equivalent to a
Show answer without attempting

Answer: C

Q8

Number Representation and ArithmeticNAT1 mark
Consider the equation (123)5=(x8)y(123)_5 = (x8)_y with xx and yy as unknown. The number of possible solutions is _____ .
Show answer without attempting

Answer: 3

Q9

Memory HierarchyNAT1 mark
A 4-way set-associative cache memory unit with a capacity of 16 KB is built using a block size of 8 words. The word length is 32 bits. The size of the physical address space is 4 GB. The number of bits for the TAG field is _____
Show answer without attempting

Answer: 20

Q10

C ProgrammingNAT1 mark
Consider the function func shown below:
int func(int num) {
int count = 0;
    while (num) {
       count++;
       num>>= 1;
    }
return (count);
}
The value returned by func(435) is __________.
Show answer without attempting

Answer: 9

Q11

C ProgrammingMCQ1 mark−1/3 if wrong
Suppose n and p are unsigned int variables in a C program. We wish to set p to nC3^{n}C_{3}. If n is large, which one of the following statements is most likely to set p correctly?
Show answer without attempting

Answer: B

Q12

Tree Data StructuresMCQ1 mark−1/3 if wrong
A priority queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is: 10, 8, 5, 3, 2. Two new elements 1 and 7 are inserted into the heap in that order. The level-order traversal of the heap after the insertion of the elements is:
Show answer without attempting

Answer: A

Q13

Algorithm AnalysisMCQ1 mark−1/3 if wrong
Which one of the following correctly determines the solution of the recurrence relation with T(1)=1T(1) = 1?

T(n)=2T(n2)+log⁡nT(n) = 2T\left(\frac{n}{2}\right) + \log n
Show answer without attempting

Answer: A

Q14

Graph AlgorithmsMCQ1 mark−1/3 if wrong
Consider the tree arcs of a BFS traversal from a source node W in an unweighted, connected, undirected graph. The tree T formed by the tree arcs is a data structure for computing
Show answer without attempting

Answer: B

Q15

Regular LanguagesMCQ1 mark−1/3 if wrong
If L1={an∣n≥0}L_1 = \{a^n \mid n \geq 0\} and L2={bn∣n≥0}L_2 = \{b^n \mid n \geq 0\}, consider

(I) L1⋅L2L_1 \cdot L_2 is a regular language
(II) L1⋅L2={anbn∣n≥0}L_1 \cdot L_2 = \{a^n b^n \mid n \geq 0\}

Which one of the following is CORRECT?
Show answer without attempting

Answer: A

Q16

ComputabilityMCQ1 mark−1/3 if wrong
Let A≤mBA \leq_m B denotes that language A is mapping reducible (also known as many-to-one reducible) to language B. Which one of the following is FALSE?
Show answer without attempting

Answer: D

Q17

ParsingMCQ1 mark−1/3 if wrong
Consider the grammar defined by the following production rules, with two operators ∗* and ++

S→T∗PS \rightarrow T * P
T→U∣T∗UT \rightarrow U \mid T * U
P→Q+P∣QP \rightarrow Q + P \mid Q
Q→IdQ \rightarrow Id
U→IdU \rightarrow Id

Which one of the following is TRUE?
Show answer without attempting

Answer: B

Q18

Runtime EnvironmentsMCQ1 mark−1/3 if wrong
Which one of the following is NOT performed during compilation?
Show answer without attempting

Answer: A

Q19

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

Answer: C

Q20

File SystemsNAT1 mark
A FAT (file allocation table) based file system is being used and the total overhead of each entry in the FAT is 4 bytes in size. Given a 100×106100 \times 10^6 bytes disk on which the file system is stored and data block size is 10310^3 bytes, the maximum size of a file that can be stored on this disk in units of 10610^6 bytes is ____________.
Show answer without attempting

Answer: 99.55 to 99.65

Q21

Relational DesignNAT1 mark
The maximum number of superkeys for the relation schema R(E,F,G,H) with E as the key is _____.
Show answer without attempting

Answer: 8

Q22

Relational DesignNAT1 mark
Given an instance of the STUDENTS relation as shown below:
StudentIDStudentNameStudentEmailStudentAgeCPI
2345Shankarshankar@mathX9.4
1287Swatiswati@ee199.5
7853Shankarshankar@cse199.4
9876Swatiswati@mech189.3
8765Ganeshganesh@civil198.7
For (StudentName, StudentAge) to be a key for this instance, the value X should NOT be equal to _______________.
Show answer without attempting

Answer: 19

Q23

RoutingMCQ1 mark−1/3 if wrong
Which one of the following is TRUE about the interior gateway routing protocols – Routing Information Protocol (RIP) and Open Shortest Path First (OSPF)?
Show answer without attempting

Answer: A

Q24

Transport LayerMCQ1 mark−1/3 if wrong
Which one of the following socket API functions converts an unconnected active TCP socket into a passive socket?
Show answer without attempting

Answer: C

Q25

IPv4NAT1 mark
In the diagram shown below, L1 is an Ethernet LAN and L2 is a Token-Ring LAN. An IP packet originates from sender S and traverses to R, as shown. The links within each ISP and across the two ISPs, are all point-to-point optical links. The initial value of the TTL field is 32. The maximum possible value of the TTL field when R receives the datagram is ____________.
Question figure
Show answer without attempting

Answer: 26

Q26

Layering and SwitchingMCQ2 marks−2/3 if wrong
Consider the store and forward packet switched network given below. Assume that the bandwidth of each link is 10610^6 bytes / sec. A user on host A sends a file of size 10310^3 bytes to host B through routers R1 and R2 in three different ways. In the first case a single packet containing the complete file is transmitted from A to B. In the second case, the file is split into 10 equal parts, and these packets are transmitted from A to B. In the third case, the file is split into 20 equal parts and these packets are sent from A to B. Each packet contains 100 bytes of header information along with the user data. Consider only transmission time and ignore processing, queuing and propagation delays. Also assume that there are no errors during transmission. Let T1, T2 and T3 be the times taken to transmit the file in the first, second and third case respectively. Which one of the following is CORRECT?

A — R1 — R2 — B
Show answer without attempting

Answer: D

Q27

Layering and SwitchingMCQ2 marks−2/3 if wrong
An IP machine Q has a path to another IP machine H via three IP routers R1, R2, and R3.

Q—R1—R2—R3—H

H acts as an HTTP server, and Q connects to H via HTTP and downloads a file. Session layer encryption is used, with DES as the shared key encryption protocol. Consider the following four pieces of information:

[I1] The URL of the file downloaded by Q
[I2] The TCP port numbers at Q and H
[I3] The IP addresses of Q and H
[I4] The link layer addresses of Q and H

Which of I1, I2, I3, and I4 can an intruder learn through sniffing at R2 alone?
Show answer without attempting

Answer: C

Q28

Application LayerMCQ2 marks−2/3 if wrong
A graphical HTML browser resident at a network client machine Q accesses a static HTML webpage from a HTTP server S. The static HTML page has exactly one static embedded image which is also at S. Assuming no caching, which one of the following is correct about the HTML webpage loading (including the embedded image)?
Show answer without attempting

Answer: B

Q29

TransactionsMCQ2 marks−2/3 if wrong
Consider the following schedule S of transactions T1, T2, T3, T4:
T1T2T3T4
Reads(X)
Writes(X)
Commit
Writes(X)
Commit
Writes(Y)
Reads(Z)
Commit
Reads(X)
Reads(Y)
Commit
Which one of the following statements is CORRECT?
Show answer without attempting

Answer: C

Q30

Relational QueriesMCQ2 marks−2/3 if wrong
Consider a join (relation algebra) between relations r(R) and s(S) using the nested loop method. There are 3 buffers each of size equal to disk block size, out of which one buffer is reserved for intermediate results. Assuming size(r(R)) < size(s(S)), the join will have fewer number of disk block accesses if
Show answer without attempting

Answer: A

Q31

Concurrency and SynchronizationMCQ2 marks−2/3 if wrong
Consider the procedure below for the Producer-Consumer problem which uses semaphores:
semaphore n = 0;
semaphore s = 1;

void producer()
{
    while(true)
    {
        produce();
        semWait(s);
        addToBuffer();
        semSignal(s);
        semSignal(n);
    }
}

void consumer()
{
    while(true)
    {
        semWait(s);
        semWait(n);
        removeFromBuffer();
        semSignal(s);
        consume();
    }
}
Which one of the following is TRUE?
Show answer without attempting

Answer: C

Q32

SchedulingNAT2 marks
Three processes A, B and C each execute a loop of 100 iterations. In each iteration of the loop, a process performs a single computation that requires tct_c CPU milliseconds and then initiates a single I/O operation that lasts for tiot_{io} milliseconds. It is assumed that the computer where the processes execute has sufficient number of I/O devices and the OS of the computer assigns different I/O devices to each process. Also, the scheduling overhead of the OS is negligible. The processes have the following characteristics:
Process idtct_ctiot_{io}
A100 ms500 ms
B350 ms500 ms
C200 ms500 ms
The processes A, B, and C are started at times 0, 5 and 10 milliseconds respectively, in a pure time sharing system (round robin scheduling) that uses a time slice of 50 milliseconds. The time in milliseconds at which process C would complete its first I/O operation is ___________.
Show answer without attempting

Answer: 1000

Q33

Memory ManagementMCQ2 marks−2/3 if wrong
A computer has twenty physical page frames which contain pages numbered 101 through 120. Now a program accesses the pages numbered 1, 2, …, 100 in that order, and repeats the access sequence THRICE. Which one of the following page replacement policies experiences the same number of page faults as the optimal page replacement policy for this program?
Show answer without attempting

Answer: D

Q34

Intermediate CodeMCQ2 marks−2/3 if wrong
For a C program accessing X[i][j][k], the following intermediate code is generated by a compiler. Assume that the size of an integer is 32 bits and the size of a character is 8 bits.
t0 = i * 1024
t1 = j * 32
t2 = k * 4
t3 = t1 + t0
t4 = t3 + t2
t5 = X[t4]
Which one of the following statements about the source code for the C program is CORRECT?
Show answer without attempting

Answer: A

Q35

ComputabilityMCQ2 marks−2/3 if wrong
Let ⟨M⟩\langle M \rangle be the encoding of a Turing machine as a string over Σ={0,1}\Sigma = \{0, 1\}. Let L={⟨M⟩∣M is a Turing machine that accepts a string of length 2014}L = \{ \langle M \rangle \mid M \text{ is a Turing machine that accepts a string of length } 2014 \}. Then, LL is
Show answer without attempting

Answer: B

Q36

Regular LanguagesMCQ2 marks−2/3 if wrong
Let L1={w∈{0,1}∗∣w has at least as many occurrences of (110)’s as (011)’s}L_1 = \{w \in \{0,1\}^* \mid w \text{ has at least as many occurrences of (110)'s as (011)'s}\}. Let L2={w∈{0,1}∗∣w has at least as many occurrences of (000)’s as (111)’s}L_2 = \{w \in \{0,1\}^* \mid w \text{ has at least as many occurrences of (000)'s as (111)'s}\}. Which one of the following is TRUE?
Show answer without attempting

Answer: A

Q37

Algorithm DesignNAT2 marks
Consider two strings AA = "qpqrr" and BB = "pqprqrp". Let xx be the length of the longest common subsequence (not necessarily contiguous) between AA and BB and let yy be the number of such longest common subsequences between AA and BB. Then x+10yx + 10y = ___.
Show answer without attempting

Answer: 34

Q38

Algorithm DesignNAT2 marks
Suppose P, Q, R, S, T are sorted sequences having lengths 20, 24, 30, 35, 50 respectively. They are to be merged into a single sequence by merging together two sequences at a time. The number of comparisons that will be needed in the worst case by the optimal algorithm for doing this is ____.
Show answer without attempting

Answer: 358

Q39

Tree Data StructuresNAT2 marks
Consider the expression tree shown. Each leaf represents a numerical value, which can either be 0 or 1. Over all possible choices of the values at the leaves, the maximum possible value of the expression represented by the tree is ___.
Question figure
Show answer without attempting

Answer: 6

Q40

RecursionNAT2 marks
Consider the following function
double f(double x){
   if( abs(x*x - 3) < 0.01) return x;
   else return f(x/2 + 1.5/x);
}
Give a value q (to 2 decimals) such that f(q) will return q:_____.
Show answer without attempting

Answer: 1.72 to 1.74

Q41

Linear Data StructuresMCQ2 marks−2/3 if wrong
Suppose a stack implementation supports an instruction REVERSE, which reverses the order of elements on the stack, in addition to the PUSH and POP instructions. Which one of the following statements is TRUE with respect to this modified stack?
Show answer without attempting

Answer: C

Q42

RecursionMCQ2 marks−2/3 if wrong
Consider the C function given below.
int f(int j)
{
  static int i = 50;
  int k;
  if (i == j)
     {
       printf("something");
       k = f(i);
       return 0;
     }
  else return 0;
}
Which one of the following is TRUE?
Show answer without attempting

Answer: D

Q43

Memory HierarchyMCQ2 marks−2/3 if wrong
In designing a computer’s cache system, the cache block (or cache line) size is an important parameter. Which one of the following statements is correct in this context?
Show answer without attempting

Answer: D

Q44

Memory HierarchyMCQ2 marks−2/3 if wrong
If the associativity of a processor cache is doubled while keeping the capacity and block size unchanged, which one of the following is guaranteed to be NOT affected?
Show answer without attempting

Answer: D

Q45

Number Representation and ArithmeticMCQ2 marks−2/3 if wrong
The value of a float type variable is represented using the single-precision 32-bit floating point format of IEEE-754 standard that uses 1 bit for sign, 8 bits for biased exponent and 23 bits for mantissa. A float type variable X is assigned the decimal value of −14.25-14.25. The representation of X in hexadecimal notation is
Show answer without attempting

Answer: A

Q46

CalculusMCQ2 marks−2/3 if wrong
In the Newton-Raphson method, an initial guess of x0=2x_0 = 2 is made and the sequence x0,x1,x2,…x_0, x_1, x_2, \ldots is obtained for the function

0.75x3−2x2−2x+4=00.75x^3 - 2x^2 - 2x + 4 = 0

Consider the statements

(I) x3=0x_3 = 0.
(II) The method converges to a solution in a finite number of iterations.

Which of the following is TRUE?
Show answer without attempting

Answer: A

Q47

Linear AlgebraNAT2 marks
The product of the non-zero eigenvalues of the matrix

[1000101110011100111010001]\begin{bmatrix} 1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 1 & 1 & 0 \\ 0 & 1 & 1 & 1 & 0 \\ 0 & 1 & 1 & 1 & 0 \\ 1 & 0 & 0 & 0 & 1 \end{bmatrix}

is ______.
Show answer without attempting

Answer: 6

Q48

Probability and StatisticsNAT2 marks
The probability that a given positive integer lying between 1 and 100 (both inclusive) is NOT divisible by 2, 3 or 5 is ______ .
Show answer without attempting

Answer: 0.259 to 0.261

Q49

Discrete MathematicsNAT2 marks
The number of distinct positive integral factors of 2014 is ______.
Show answer without attempting

Answer: 8

Q50

Discrete MathematicsMCQ2 marks−2/3 if wrong
Consider the following relation on subsets of the set SS of integers between 1 and 2014. For two distinct subsets UU and VV of SS we say U<VU < V if the minimum element in the symmetric difference of the two sets is in UU.

Consider the following two statements:

S1S1: There is a subset of SS that is larger than every other subset.
S2S2: There is a subset of SS that is smaller than every other subset.

Which one of the following is CORRECT?
Show answer without attempting

Answer: A

Q51

Discrete MathematicsNAT2 marks
A cycle on nn vertices is isomorphic to its complement. The value of nn is _____.
Show answer without attempting

Answer: 5

Q52

Graph AlgorithmsNAT2 marks
The number of distinct minimum spanning trees for the weighted graph below is _____
Question figure
Show answer without attempting

Answer: 6

Q53

Discrete MathematicsMCQ2 marks−2/3 if wrong
Which one of the following Boolean expressions is NOT a tautology?
Show answer without attempting

Answer: B

Q54

Relational QueriesMCQ2 marks−2/3 if wrong
SQL allows duplicate tuples in relations, and correspondingly defines the multiplicity of tuples in the result of joins. Which one of the following queries always gives the same answer as the nested query shown below:
select * from R where a in (select S.a from S)
Show answer without attempting

Answer: C

Q55

Memory HierarchyNAT2 marks
Consider a main memory system that consists of 8 memory modules attached to the system bus, which is one word wide. When a write request is made, the bus is occupied for 100 nanoseconds (ns) by the data, address, and control signals. During the same 100 ns, and for 500 ns thereafter, the addressed memory module executes one cycle accepting and storing the data. The (internal) operation of different memory modules may overlap in time, but only one request can be on the bus at any time. The maximum number of stores (of one word each) that can be initiated in 1 millisecond is ____________
Show answer without attempting

Answer: 10000

0/650 correct0 marks

More GATE CS papers