GATE Computer Science & IT 2014 — GATE 2014 · CS · Set 1

CS Set 1 · 65 of 65 questions publicly available

Sections: General Aptitude, Computer Science & IT

Subject marks
Subject1 mark questions2 mark questionsTotal marks
General Aptitude5515
Computer Science253085

Question 1 · 1 mark Q3505

Consider the statement

“Not all that glitters is gold”

Predicate glitters(x)glitters(x) is true if xx glitters and predicate gold(x)gold(x) is true if xx is gold. Which one of the following logical formulae represents the above statement?

  1. A.

    ∀x:glitters(x)⇒¬gold(x)\forall x: \text{glitters} (x)\Rightarrow \neg \text{gold}(x)

  2. B.

    ∀x:gold(x)⇒glitters(x)\forall x:\text{gold} (x)\Rightarrow \text{glitters}(x)

  3. C.

    ∃x:gold(x)∧¬glitters(x)\exists x: \text{gold}(x)\wedge \neg \text{glitters}(x)

  4. D.

    ∃x:glitters(x)∧¬gold(x)\exists x: \text{glitters}(x)\wedge \neg \text{gold}(x)

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): D

Solutions and video are in the course

Question 2 · 1 mark Q3506

Suppose you break a stick of unit length at a point chosen uniformly at random. Then the expected length of the shorter stick is ________ .

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 0.24 to 0.27

Solutions and video are in the course

Question 3 · 1 mark Q3507

Let G=(V,E)G=(V,E) be a directed graph where VV is the set of vertices and EE the set of edges. Then which one of the following graphs has the same strongly connected components as GG ?

  1. A.

    G1=(V,E1)G_1 = (V,E_1)  where E1={(u,v)∣(u,v)∉E} E_1 = \left\{(u,v) \mid (u,v) \notin E\right\}

  2. B.

    G2=(V,E2)G_2 = (V,E_2) where E2={(u,v)∣(v,u)∈E}E_2 = \left\{(u,v) \mid (v,u) \in E \right\}

  3. C.

    G3=(V,E3)G_3=(V,E_3) where E3={(u,v)∣there is a path of length ≤2 from u to v in E}E_3=\{(u,v)\mid \text{there is a path of length }\leq 2\text{ from }u\text{ to }v\text{ in }E\}

  4. D.

    G4=(V4,E)G_4 = (V_4,E) where V4V_4  is the set of vertices in GG which are not isolated

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): B

Solutions and video are in the course

Question 4 · 1 mark Q3508

Consider the following system of equations:

3x + 2y = 1

4x + 7z = 1

x + y + z = 3

x – 2y + 7z = 0

The number of solutions for this system is __________________

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 1

Solutions and video are in the course

Question 5 · 1 mark Q3509

The value of the dot product of the eigenvectors corresponding to any pair of different eigenvalues of a 4-by-4 symmetric positive definite matrix is _____________________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 0

Solutions and video are in the course

Question 6 · 1 mark Q3510

Let the function

f(θ)=∣sin⁡θcos⁡θtan⁡θsin⁡(π6)cos⁡(π6)tan⁡(π6)sin⁡(π3)cos⁡(π3)tan⁡(π3)∣f(\theta) = \begin{vmatrix} \sin\theta & \cos\theta & \tan\theta \\ \sin(\frac{\pi}{6}) & \cos(\frac{\pi}{6}) & \tan(\frac{\pi}{6}) \\ \sin(\frac{\pi}{3}) & \cos(\frac{\pi}{3}) & \tan(\frac{\pi}{3}) \end{vmatrix}

where θ∈[π6,π3]\theta \in \left[ \frac{\pi}{6},\frac{\pi}{3} \right] and  f′(θ)f'(\theta) denote the derivative of ff with respect to θ\theta. Which of the following statements is/are TRUE?

I. There exists θ∈(π6,π3)\theta \in (\frac{\pi}{6},\frac{\pi}{3}) such that f′(θ)=0f'(\theta) = 0

II.  There exists θ∈(π6,π3)\theta \in (\frac{\pi}{6},\frac{\pi}{3}) such that f′(θ)≠0f'(\theta)\neq 0

  1. A.

    I only

  2. B.

    II only

  3. C.

    Both I and II

  4. D.

    Neither I nor II

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 7 · 1 mark Q3511

Consider the following Boolean expression for FF:

F(P,Q,R,S)=PQ+PˉQR+PˉQRˉSF(P,Q,R,S)= PQ + \bar{P}QR + \bar{P}Q\bar{R}S

The minimal sum-of-products form of FF is

  1. A.

    PQ+QR+QSPQ+QR+QS

  2. B.

    P+Q+R+SP+Q+R+S

  3. C.

    Pˉ+Qˉ+Rˉ+Sˉ\bar{P} + \bar{Q}+ \bar{R}+ \bar{S}

  4. D.

    PˉR+RˉPˉS+P\bar{P}R + \bar{R} \bar{P}S+P

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): A

Solutions and video are in the course

Question 8 · 1 mark Q3512

The base (or radix) of the number system such that the following equation holds is____________.

31220=13.1\frac {312} {20} = 13.1

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 5

Solutions and video are in the course

Question 9 · 1 mark Q3513

A machine has a 32-bit architecture, with 1-word long instructions. It has 64 registers, each of which is 32 bits long. It needs to support 45 instructions, which have an immediate operand in addition to two register operands. Assuming that the immediate operand is an unsigned integer, the maximum value of the immediate operand is ____________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 16383

Solutions and video are in the course

Question 10 · 1 mark Q3514

Consider the following program in C language:

#include <stdio.h>
main()
{
    int i;
    int *pi = &i;
    scanf("%d",pi);
    printf("%d\n", i+5);
}

Which one of the following statements is TRUE?

  1. A.

    Compilation fails.

  2. B.

    Execution results in a run-time error.

  3. C.

    On execution, the value printed is 5 more than the address of variable i.

  4. D.

    On execution, the value printed is 5 more than the integer value entered.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): D

Solutions and video are in the course

Question 11 · 1 mark Q3515

Let GG be a graph with nn vertices and mm edges. What is the tightest upper bound on the running time of Depth First Search on GG, when GG is represented as an adjacency matrix?

  1. A.

    θ(n)\theta (n)

  2. B.

    θ(n+m)\theta (n + m)

  3. C.

    θ(n2)\theta (n^2)

  4. D.

    θ(m2)\theta (m^2)

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 12 · 1 mark Q3516

Consider a rooted nn node binary tree represented using pointers. The best upper bound on the time required to determine the number of subtrees having exactly 4 nodes is O(nalog⁡bn)O(n^a\log^bn). Then the value of a+10ba + 10b is __________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 1

Solutions and video are in the course

Question 13 · 1 mark Q3517

Consider the directed graph below given. 

Which one of the following is TRUE?

  1. A.

    The graph does not have any topological ordering.

  2. B.

    Both PQRS and SRQP are topological orderings.

  3. C.

    Both PSRQ and SPRQ are topological orderings.

  4. D.

    PSRQ is the only topological ordering.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 14 · 1 mark Q3518

Let PP be quicksort program to sort numbers in ascending order using the first element as the pivot. Let t1t_1 and t2t_2 be the number of comparisons made by PP for the inputs  [1 2 3 4 5] and [4 1 5 3 2] respectively. Which one of the following holds?

  1. A.

    t1=5t_1 = 5

  2. B.

    t1<t2t_1 < t_2

  3. C.

    t1>t2t_1 > t_2

  4. D.

    t1=t2t_1 = t_2

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 15 · 1 mark Q6108

Which one of the following is TRUE?

  1. A.

    The language L={anbn | n≥0} is regular.

  2. B.

    The language L={an | n is prime} is regular.

  3. C.

    The language L={w ∣ w has 3k+1 b’s for some k ∈ N with Σ = {a,b}} is regular.

  4. D.

    The language L={ww ∣ w ∈ Σ∗ with Σ = {0,1}} is regular.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 16 · 1 mark Q3520

Consider the finite automaton in the following figure.

image.png

What is the set of reachable states for the input string 0011 ?

  1. A.

    {q0,q1,q2}\{q_0,q_1,q_2 \}

  2. B.

    {q0,q1}\{q_0,q_1\}

  3. C.

    {q0,q1,q2,q3}\{q_0,q_1,q_2, q_3 \}

  4. D.

    {q3}\{q_3 \}

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): A

Solutions and video are in the course

Question 17 · 1 mark Q60928

Which one of the following is FALSE?

  1. A.

    A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end

  2. B.

    Available expression analysis can be used for common subexpression elimination

  3. C.

    Live variable analysis can be used for dead code elimination

  4. D.

    x = 4 * 5 ⇒ x = 20 is an example of common subexpression elimination

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): D

Solutions and video are in the course

Question 18 · 1 mark Q3522

Match the following software process models with their characteristics.

Models

1) Waterfall model

2) Evolutionary model

3) Component-based software engineering

4) Spiral development

Characteristics

a) Specifications can be developed incrementally

b) Requirements compromises are inevitable

c) Explicit recognition of risk

d) Inflexible partitioning of the project into stages

  1. A.

    1-a, 2-b, 3-c, 4-d

  2. B.

    1-d, 2-a, 3-b, 4-c

  3. C.

    1-d, 2-b, 3-a, 4-c

  4. D.

    1-c, 2-a, 3-b, 4-d

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): B

Solutions and video are in the course

Question 19 · 1 mark Q1881

Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time, the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinders 30, 85, 90, 100, 105, 110, 135 and 145. If Shortest-Seek Time First (SSTF) is being used for scheduling the disk access, the request for cylinder 90 is serviced after servicing ____________ number of requests.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 3

Solutions and video are in the course

Question 20 · 1 mark Q1832

Which one of the following is FALSE?

  1. A.

    User level threads are not scheduled by the kernel.

  2. B.

    When a user level thread is blocked, all other threads of its process are blocked.

  3. C.

    Context switching between user level threads is faster than context switching between kernel level threads.

  4. D.

    Kernel level threads cannot share the code segment

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): D

Solutions and video are in the course

Question 21 · 1 mark Q3525

Consider the relation scheme R=(E,F,G,H,I,J,K,L,M,N)R = (E, F, G, H, I, J, K, L, M, N) and the set of functional dependencies

{{E,F}→{G},{F}→{I,J},{E,H}→{K,L}, {K}→{M},{L}→{N}}\left\{ \{E, F \} \to \{G\}, \{F\} \to \{I, J\}, \{E, H\} \to \{K, L\}, \ \{K\} \to \{M\}, \{L\} \to \{N\}\right\}

on RR. What is the key for RR?

  1. A.

    {E,F}\{ E, F\}

  2. B.

    {E,F,H}\{ E, F, H\}

  3. C.

    {E,F,H,K,L}\{ E, F, H,K,L \}

  4. D.

    {E}\{ E \}

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): B

Solutions and video are in the course

Question 22 · 1 mark Q3526

Given the following statements:

S1: A foreign key declaration can always be replaced by an equivalent check  assertion in SQL. 

S2: Given the table R(a,b,c)R(a,b,c) where aa and bb together form the primary key, the following is a valid table definition.

CREATE TABLE S (
    a INTEGER,
    d INTEGER,
    e INTEGER,
    PRIMARY KEY (d),
    FOREIGN KEY (a) references R)

Which one of the following statements is CORRECT?

  1. A.

    S1 is TRUE and S2 is FALSE.

  2. B.

    Both S1 and S2 are TRUE.

  3. C.

    S1 is FALSE and S2 is TRUE.

  4. D.

    Both S1 and S2 are FALSE.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): D

Solutions and video are in the course

Question 23 · 1 mark Q3527

Consider the following three statements about link state and distance vector routing protocols, for a large network with 500 network nodes and 4000 links.

[S1] The computational overhead in link state protocols is higher than in distance vector protocols.

[S2] A distance vector protocol (with split horizon) avoids persistent routing loops, but not a link state protocol.

[S3] After a topology change, a link state protocol will converge faster than a distance vector protocol.

Which one of the following is correct about S1, S2, and S3 ?

  1. A.

    S1, S2, and S3 are all true.

  2. B.

    S1, S2, and S3 are all false.

  3. C.

    S1 and S2 are true, but S3 is false.

  4. D.

    S1 and S3 are true, but S2 is false.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): D

Solutions and video are in the course

Question 24 · 1 mark Q3528

Which of the following are used to generate a message digest by the network security protocols?

(P) RSA (Q) SHA-1 (R) DES (S) MD5

  1. A.

    P and R only

  2. B.

    Q and R only

  3. C.

    Q and S only

  4. D.

    R and S only

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 25 · 1 mark Q3529

Identify the correct order in which the following actions take place in an interaction between a web browser and a web server.

1. The web browser requests a webpage using HTTP.

2. The web browser establishes a TCP connection with the web server.

3. The web server sends the requested webpage using HTTP.

4. The web browser resolves the domain name using DNS.

  1. A.

    4,2,1,3

  2. B.

    1,2,3,4

  3. C.

    4,1,2,3

  4. D.

    2,4,1,3

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): A

Solutions and video are in the course

Question 26 · 2 marks Q3530

Consider a token ring network with a length of 2 km having 10 stations including a monitoring station. The propagation speed of the signal is 2 × 10⁸ m/s and the token transmission time is ignored. If each station is allowed to hold the token for 2 µsec, the minimum time for which the monitoring station should wait (in µ sec)before assuming that the token is lost is _______.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 28 µsec

Solutions and video are in the course

Question 27 · 2 marks Q3531

Let the size of congestion window of a TCP connection be 32 KB when a timeout occurs. The round trip time of the connection is 100 msec and the maximum segment size used is 2 KB. The time taken (in msec) by the TCP connection to get back to 32 KB congestion window is _________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 1100

Solutions and video are in the course

Question 28 · 2 marks Q3532

Consider a selective repeat sliding window protocol that uses a frame size of 1 KB to send data on a 1.5 Mbps link with a one-way latency of 50 msec. To achieve a link utilization of 60%, the minimum number of bits required to represent the sequence number field is ________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 5 bits

Solutions and video are in the course

Question 29 · 2 marks Q3533

Consider the following four schedules due to three transactions (indicated by the subscript) using readread and writewrite on a data item xx, denoted by r(x)r(x) and w(x)w(x) respectively. Which one of them is conflict serializable?

  1. A.

    r1(x);r2(x);w1(x);r3(x);w2(x)r_1(x); r_2(x); w_1(x); r_3(x); w_2(x)

  2. B.

    r2(x);r1(x);w2(x);r3(x);w1(x)r_2(x);r_1(x);w_2(x);r_3(x);w_1(x)

  3. C.

    r3(x);r2(x);r1(x);w2(x);w1(x)r_3(x);r_2(x);r_1(x);w_2(x);w_1(x)

  4. D.

    r2(x);w2(x);r3(x);r1(x);w1(x)r_2(x);w_2(x);r_3(x);r_1(x);w_1(x)

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): D

Solutions and video are in the course

Question 30 · 2 marks Q2063

Given the following two statements:
S1: Every table with two single-valued attributes is in 1NF, 2NF, 3NF and BCNF.
S2: AB → C, D → E, E → C is a minimal cover for the set of functional dependencies  AB→C, D→E, AB→E, E→C.
Which one of the following is CORRECT?

  1. A.

    S1 is TRUE and S2 is FALSE.

  2. B.

    Both S1 and S2 are TRUE.

  3. C.

    S1 is FALSE and S2 is TRUE.

  4. D.

    Both S1 and S2 are FALSE.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): A

Solutions and video are in the course

Question 31 · 2 marks Q1964

An operating system uses the Banker’s algorithm for deadlock avoidance when managing the allocation of three resource types X, Y, and Z to three processes P0, P1, and P2. The table given below presents the current system state. Here, the Allocation matrix shows the current number of resources of each type allocated to each process and the Max matrix shows the maximum number of resources of each type required by each process during its execution.

Process

Allocation X

Allocation Y

Allocation Z

Max X

Max Y

Max Z

P₀

0

0

1

8

4

3

P₁

3

2

0

6

2

0

P₂

2

1

1

3

3

3

There are 3 units of type X, 2 units of type Y and 2 units of type Z still available. The system is currently in a safe state. Consider the following independent requests for additional resources in the current state:

REQ1: P0 requests 0 units of X, 0 units of Y and 2 units of Z

REQ2: P1 requests 2 units of X, 0 units of Y and 0 units of Z

Which one of the following is TRUE?

  1. A.

    Only REQ1 can be permitted.

  2. B.

    Only REQ2 can be permitted.

  3. C.

    Both REQ1 and REQ2 can be permitted.

  4. D.

    Neither REQ1 nor REQ2 can be permitted

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): B

Solutions and video are in the course

Question 32 · 2 marks Q3536

Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds.

Process NameArrival TimeExecution TimeA06B32C54D76E103\small \begin{array}{|c|c|c|} \hline \textbf{Process Name} & \textbf{Arrival Time} & \textbf{Execution Time} \\\hline \text{A} & 0 & 6 \\\hline \text{B} & 3 & 2 \\\hline \text{C} & 5 & 4 \\\hline \text{D} & 7 & 6 \\\hline \text{E} & 10 & 3 \\\hline \end{array}

Using the shortest remaining time first scheduling algorithm, the average process turnaround time (in msec) is ____________________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 7.2

Solutions and video are in the course

Question 33 · 2 marks Q1914

Assume that there are 3 page frames which are initially empty. If the page reference string is 1, 2, 3, 4, 2, 1, 5, 3, 2, 4, 6, the number of page faults using the optimal replacement policy is__________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 7

Solutions and video are in the course

Question 34 · 2 marks Q3538

A canonical set of items is given below

S→L.>RS \to L .> R

Q→R.Q \to R.

On input symbol < the set has

  1. A.

    a shift-reduce conflict and a reduce-reduce conflict.

  2. B.

    a shift-reduce conflict but not a reduce-reduce conflict.

  3. C.

    a reduce-reduce conflict but not a shift-reduce conflict.

  4. D.

    neither a shift-reduce nor a reduce-reduce conflict.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): D

Solutions and video are in the course

Question 35 · 2 marks Q3539

Let LL be a language and L‾\overline L be its complement. Which one of the following is NOT a viable possibility?

  1. A.

    Neither LL nor L‾\overline L is recursively enumerable (r.e.).

  2. B.

    One of LL and L‾\overline L is r.e. but not recursive; the other is not r.e.

  3. C.

    Both LL and L‾\overline L are r.e. but not recursive.

  4. D.

    Both LL and L‾\overline L are recursive.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 36 · 2 marks Q3540

Which of the regular expressions given below represent the following DFA?

I) 0*1(1+00*1)*

II) 0*1*1+11*0*1

III) (0+1)*1

  1. A.

    I and II only

  2. B.

    I and III only

  3. C.

    II and III only

  4. D.

    I, II, and III

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): B

Solutions and video are in the course

Question 37 · 2 marks Q3541

There are 5 bags labeled 1 to 5. All the coins in a given bag have the same weight. Some bags have coins of weight 10 gm, others have coins of weight 11 gm. I pick 1, 2, 4, 8, 16 coins respectively from bags 1 to 5. Their total weight comes out to 323 gm. Then the product of the labels of the bags having 11 gm coins is ___.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 12

Solutions and video are in the course

Question 38 · 2 marks Q3542

Suppose a polynomial time algorithm is discovered that correctly computes the largest clique in a given graph. In this scenario, which one of the following represents the correct Venn diagram of the complexity classes P, NP and NP Complete (NPC)?

  1. A.

  2. B.

  3. C.

  4. D.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): D

Solutions and video are in the course

Question 39 · 2 marks Q3543

The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is _________________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 148

Solutions and video are in the course

Question 40 · 2 marks Q3544

Consider a hash table with 9 slots. The hash function is h(k)=k mod 9h(k) = k \ mod \ 9. The collisions are resolved by chaining. The following 9 keys are inserted in the order: 5, 28, 19, 15, 20, 33, 12, 17, 10. The maximum, minimum, and average chain lengths in the hash table, respectively, are

  1. A.

    3, 0, and 1

  2. B.

    3, 3, and 3

  3. C.

    4, 0, and 1

  4. D.

    3, 0, and 2

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): A

Solutions and video are in the course

Question 41 · 2 marks Q3545

Consider the following C function in which size is the number of elements in the array E:

int MyX(int *E, unsigned int size)
{
    int Y = 0;
    int Z;
    int i, j, k;

    for(i = 0; i < size; i++)
        Y = Y + E[i];

    for(i = 0; i < size; i++)
        for(j = i; j < size; j++)
        {
            Z = 0;
            for(k = i; k <= j; k++)
                Z = Z + E[k];
            if (Z > Y)
                Y = Z;
        }
    return Y;
}

The value returned by the function MyX is the

  1. A.

    maximum possible sum of elements in any sub-array of array E.

  2. B.

    maximum element in any sub-array of array E.

  3. C.

    sum of the maximum elements in all possible sub-arrays of array E.

  4. D.

    the sum of all the elements in the array E.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): A

Solutions and video are in the course

Question 42 · 2 marks Q3546

Consider the following pseudo code. What is the total number of multiplications to be performed?

D = 2
for i = 1 to n do
    for j = i to n do
        for k = j + 1 to n do
            D = D * 3
  1. A.

    Half of the product of the 3 consecutive integers.

  2. B.

    One-third of the product of the 3 consecutive integers.

  3. C.

    One-sixth of the product of the 3 consecutive integers

  4. D.

    None of the above.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 43 · 2 marks Q3547

Consider a 6-stage instruction pipeline, where all stages are perfectly balanced.Assume that there is no cycle-time overhead of pipelining. When an application is executing on this 6-stage pipeline, the speedup achieved with respect to non-pipelined execution if 25% of the instructions incur 2 pipeline stall cycles is ______________________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 4

Solutions and video are in the course

Question 44 · 2 marks Q3548

An access sequence of cache block addresses is of length NN and contains n unique block addresses. The number of unique block addresses between two consecutive accesses to the same block address is bounded above by kk. What is the miss ratio if the access sequence is passed through a cache of associativity A≥kA\geq k exercising least-recently-used replacement policy?

  1. A.

    n/Nn/N

  2. B.

    1/N1/N

  3. C.

    1/A1/A

  4. D.

    k/nk/n

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): A

Solutions and video are in the course

Question 45 · 2 marks Q3549

Consider the 4-to-1 multiplexer with two select lines S1S_1 and S0S_0 given below

The minimal sum-of-products form of the Boolean expression for the output FFof the multiplexer is

  1. A.

    PˉQ+QRˉ+PQˉR\bar{P}Q + Q\bar{R} + P\bar{Q}R

  2. B.

    PˉQ+PˉQRˉ+PQRˉ+PQˉR\bar{P}Q + \bar{P}Q\bar{R} + PQ\bar{R} + P\bar{Q}R

  3. C.

    PˉQR+PˉQRˉ+QRˉ+PQˉR\bar{P}QR + \bar{P}Q\bar{R} + Q\bar{R} + P\bar{Q}R

  4. D.

    PQRˉPQ\bar{R}

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): A

Solutions and video are in the course

Question 46 · 2 marks Q3550

The function f(x)=xsin⁡xf(x) =x \sin x satisfies the following equation:

f′′(x)+f(x)+tcos⁡x=0f''(x) + f(x) +t \cos x = 0

The value of tt is______.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): -2

Solutions and video are in the course

Question 47 · 2 marks Q3551

A function f(x)f(x) is continuous in the interval [0,2]. It is known that f(0)=f(2)=−1f(0) = f(2) = -1 and f(1)=1f(1) = 1. Which one of the following statements must be true?

  1. A.

    There exists a yyin the interval (0,1) such that f(y)=f(y+1)f(y) = f(y+1)

  2. B.

    For every yyin the interval (0,1), f(y)=f(2−y)f(y) = f(2-y)

  3. C.

    The maximum value of the function in the interval (0,2) is 1

  4. D.

    There exists a yyin the interval (0,1) such that f(y)=−f(2−y)f(y) = -f(2-y)

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): A

Solutions and video are in the course

Question 48 · 2 marks Q3552

Four fair six-sided dice are rolled. The probability that the sum of the results being 22 is X/1296X / 1296. The value of XX is _______

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 10

Solutions and video are in the course

Question 49 · 2 marks Q3553

A pennant is a sequence of numbers, each number being 1 or 2. An n-pennant is a sequence of numbers with sum equal to n. For example, (1,1,2) is a 4-pennant. The set of all possible 1-pennants is {(1)}, the set of all possible 2-pennants is {(2), (1,1)}and the set of all 3-pennants is {(2,1), (1,1,1), (1,2)}. Note that the pennant (1,2) is not the same as the pennant (2,1). The number of 10- pennants is ______________.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 88.9 to 89.1

Solutions and video are in the course

Question 50 · 2 marks Q3554

Let SS denote the set of all functions f:{0,1}4→{0,1}f:\{0,1\}^4 \to \{0,1\}. Denote by NN the number of functions from S to the set {0,1}. The value of log⁡2log⁡2N\log_2 \log_2N is _______.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 16

Solutions and video are in the course

Question 51 · 2 marks Q3555

Consider an undirected graph GG where self-loops are not allowed. The vertex set of GG is {(i,j)∣1≤i≤12,1≤j≤12}\{(i,j) \mid1 \leq i \leq 12, 1 \leq j \leq 12\}. There is an edge between (a,b)(a,b)  and (c,d)(c,d) if ∣a−c∣≤1|a-c| \leq 1 and ∣b−d∣≤1|b-d| \leq 1. The number of edges in this graph is______.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 506

Solutions and video are in the course

Question 52 · 2 marks Q3556

An ordered nn−tuple (d1,d2,…,dn)(d_1, d_2,\ldots,d_n) with d1≥d2≥…≥dnd_1 \geq d_2 \geq \ldots \geq d_n is called graphic  if there exists a simple undirected graph with nn vertices having degrees d1,d2,…,dnd_1,d_2,\ldots,d_n  respectively. Which one of the following 6-tuples is NOT graphic?

  1. A.

    (1, 1, 1, 1, 1, 1)

  2. B.

    (2, 2, 2, 2, 2, 2)

  3. C.

    (3, 3, 3, 1, 0, 0)

  4. D.

    (3, 2, 1, 1, 1, 0)

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 53 · 2 marks Q3557

Which one of the following propositional logic formulas is TRUE when exactly two of p,qp,q and rr are TRUE?

  1. A.

    ((p↔q)∧r)∨(p∧q∧∼r)(( p \leftrightarrow q) \wedge r) \vee (p \wedge q \wedge \sim r)

  2. B.

    (∼(p↔q)∧r)∨(p∧q∧∼r)( \sim (p \leftrightarrow q) \wedge r)\vee (p \wedge q \wedge \sim r)

  3. C.

    ((p→q)∧r)∨(p∧q∧∼r)( (p \to q) \wedge r) \vee (p \wedge q \wedge \sim r)

  4. D.

    (∼(p↔q)∧r)∧(p∧q∧∼r)(\sim (p \leftrightarrow q) \wedge r) \wedge (p \wedge q \wedge \sim r)

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): B

Solutions and video are in the course

Question 54 · 2 marks Q3558

Given the following schema:

employees(emp-id, first-name, last-name, hire-date,
          dept-id, salary)
departments(dept-id, dept-name, manager-id, location-id)

You want to display the last names and hire dates of all latest hires in their respective departments in the location ID 1700. You issue the following query:

SQL>SELECT last-name, hire-date
    FROM employees
    WHERE (dept-id, hire-date) IN
    (SELECT dept-id, MAX(hire-date)
    FROM employees JOIN departments USING(dept-id)
    WHERE location-id = 1700
    GROUP BY dept-id);

What is the outcome?

  1. A.

    It executes but does not give the correct result.

  2. B.

    It executes and gives the correct result.

  3. C.

    It generates an error because of pairwise comparison.

  4. D.

    It generates an error because the GROUP BY clause cannot be used with table joins in a subquery.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): B

Solutions and video are in the course

Question 55 · 2 marks Q3559

Consider two processors P1P_1 and P2P_2 executing the same instruction set. Assume that under identical conditions, for the same input, a program running on P2P_2 takes 25% less time but incurs 20% more CPI (clock cycles per instruction) as compared to the program running on P1P_1. If the clock frequency of P1P_1 is 1GHZ, then the clock frequency of P2P_2 (in GHz) is ______.

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 1.6 GHz

Solutions and video are in the course

Question 1 · 1 mark Q3495

Which of the following options is the closest in meaning to the phrase underlined in the sentence below?

It is fascinating to see life forms cope with varied environmental conditions.

  1. A.

    adopt to

  2. B.

    adapt to

  3. C.

    adept in

  4. D.

    accept with

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): B

Solutions and video are in the course

Question 2 · 1 mark Q3496

Choose the most appropriate word from the options given below to complete the following sentence.

He could not understand the judges awarding her the first prize, because he thought that her performance was quite __________.

  1. A.

    superb

  2. B.

    medium

  3. C.

    mediocre

  4. D.

    exhilarating

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 3 · 1 mark Q3497

In a press meet on the recent scam, the minister said, "The buck stops here". What did the minister convey by the statement?

  1. A.

    He wants all the money

  2. B.

    He will return the money

  3. C.

    He will assume final responsibility

  4. D.

    He will resist all enquiries

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 4 · 1 mark Q3498

If (𝑧+1/𝑧)2(𝑧 + 1/𝑧)^2 = 98, compute (𝑧2+1/𝑧2) (𝑧^2 + 1/𝑧^2) .

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 96

Solutions and video are in the course

Question 5 · 1 mark Q3499

The roots of ax2+bx+c=0ax^2 + bx + c = 0 are real and positive. aa, bb and cc are real. Then ax2+b∣x∣+c=0ax^2 + b|x| + c = 0 has

  1. A.

    no roots

  2. B.

    2 real roots

  3. C.

    3 real roots

  4. D.

    4 real roots

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): D

Solutions and video are in the course

Question 6 · 2 marks Q3500

The Palghat Gap (or Palakkad Gap), a region about 30 km wide in the southern part of the Western Ghats in India, is lower than the hilly terrain to its north and south. The exact reasons for the formation of this gap are not clear. It results in the neighbouring regions of Tamil Nadu getting more rainfall from the South West monsoon and the neighbouring regions of Kerala having higher summer temperatures.

What can be inferred from this passage?

  1. A.

    The Palghat gap is caused by high rainfall and high temperatures in southern Tamil Nadu and Kerala

  2. B.

    The regions in Tamil Nadu and Kerala that are near the Palghat Gap are low-lying

  3. C.

    The low terrain of the Palghat Gap has a significant impact on weather patterns in neighbouring parts of Tamil Nadu and Kerala

  4. D.

    Higher summer temperatures result in higher rainfall near the Palghat Gap area

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): C

Solutions and video are in the course

Question 7 · 2 marks Q3501

Geneticists say that they are very close to confirming the genetic roots of psychiatric illnesses such as depression and schizophrenia, and consequently, that doctors will be able to eradicate these diseases through early identification and gene therapy.

On which of the following assumptions does the statement above rely?

  1. A.

    Strategies are now available for eliminating psychiatric illnesses

  2. B.

    Certain psychiatric illnesses have a genetic basis

  3. C.

    All human diseases can be traced back to genes and how they are expressed

  4. D.

    In the future, genetics will become the only relevant field for identifying psychiatric illnesses

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): B

Solutions and video are in the course

Question 8 · 2 marks Q3502

Round-trip tickets to a tourist destination are eligible for a discount of 10% on the total fare. In addition, groups of 4 or more get a discount of 5% on the total fare. If the one way single person fare is Rs 100, a group of 5 tourists purchasing round-trip tickets will be charged Rs _____________ .

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 850 Rs

Solutions and video are in the course

Question 9 · 2 marks Q3503

In a survey, 300 respondents were asked whether they own a vehicle or not. If yes, they were further asked to mention whether they own a car or scooter or both. Their responses are tabulated below. What percent of respondents do not own a scooter?

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 48 %

Solutions and video are in the course

Question 10 · 2 marks Q3504

When a point inside of a tetrahedron (a solid with four triangular surfaces) is connected by straight lines to its corners, how many (new) internal planes are created with these lines? _____________

Official answer key

Official answer key (GATE Computer Science & IT 2014 GATE 2014 · CS · Set 1): 6

Solutions and video are in the course