GATE Computer Science & IT 2015 — GATE 2015 · CS · Set 3

CS Set 3 · 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 11 · 1 mark Q3440

Consider the following C program segment.

#include <stdio.h>

int main()
{
    char s1[7] = "1234", *p;
    p = s1 + 2;
    *p = '0';
    printf("%s", s1);
}

What will be printed by the program?

  1. A.

    12

  2. B.

    120400

  3. C.

    1204

  4. D.

    1034

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 12 · 1 mark Q3441

Suppose 𝑈 is the power set of the set 𝑆 = {1,2,3,4,5,6}. For any 𝑇 ∈ 𝑈, let |𝑇| denote the number of elements in 𝑇 and 𝑇′ denote the complement of 𝑇. For any 𝑇, 𝑅 ∈ 𝑈, let 𝑇 ∖ 𝑅 be the set of all elements in 𝑇 which are not in 𝑅. Which one of the following is true?

  1. A.

    ∀𝑋 ∈ 𝑈 (|𝑋| = |𝑋′ |)

  2. B.

    ∃𝑋 ∈ 𝑈 ∃𝑌 ∈ 𝑈 (|𝑋| = 5, |𝑌| = 5 and 𝑋 ∩ 𝑌 = ∅)

  3. C.

    ∀𝑋 ∈ 𝑈 ∀𝑌 ∈ 𝑈 (|𝑋| = 2, |𝑌| = 3 and 𝑋 ∖ 𝑌 = ∅)

  4. D.

    ∀𝑋 ∈ 𝑈 ∀𝑌 ∈ 𝑈 (𝑋 ∖ 𝑌 = 𝑌′ ∖ 𝑋′ )

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): D

Solutions and video are in the course

Question 13 · 1 mark Q3442

Consider the relation 𝑋(𝑃,𝑄, 𝑅, 𝑆, 𝑇,𝑈) with the following set of functional dependencies

𝐹 = {

        {𝑃, 𝑅} → {𝑆, 𝑇},

        {𝑃, 𝑆,𝑈} → {𝑄, 𝑅}

}

Which of the following is the trivial functional dependency in 𝐹+, where 𝐹+ is closure of F ?

  1. A.

    {𝑃, 𝑅} → {𝑆, 𝑇}

  2. B.

    {𝑃, 𝑅} → {𝑅, 𝑇}

  3. C.

    {𝑃, 𝑆} → {𝑆}

  4. D.

    {𝑃, 𝑆,𝑈} → {𝑄}

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 14 · 1 mark Q3443

The maximum number of processes that can be in Ready state for a computer system with 𝑛 CPUs is

  1. A.

    nn

  2. B.

    n2n^2

  3. C.

    2n2^n

  4. D.

    Independent of nn

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): D

Solutions and video are in the course

Question 15 · 1 mark Q3444

Among simple LR (SLR) , canonical LR, and look-ahead LR (LALR), which of the following pairs identify the method that is very easy to implement and the method that is the most powerful , in that order?

  1. A.

    SLR, LALR

  2. B.

    Canonical LR, LALR

  3. C.

    SLR, canonical LR

  4. D.

    LALR, canonical LR

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 16 · 1 mark Q3445

Let # be a binary operator defined as

𝑋 # 𝑌 = 𝑋′ + 𝑌′ where 𝑋 and 𝑌 are Boolean variables.

Consider the following two statements.

(S1) (𝑃 # 𝑄)#𝑅 = 𝑃#(𝑄 # 𝑅)

(S2) 𝑄#𝑅 = 𝑅#𝑄

Which of the following is/are true for the Boolean variables 𝑃, 𝑄 and 𝑅?

  1. A.

    Only S1 is true

  2. B.

    Only S2 is true

  3. C.

    Both S1 and S2 are true

  4. D.

    Neither S1 nor S2 are true

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 17 · 1 mark Q3446

Consider a software project with the following information domain characteristics for calculation of function point metric.

Number of external inputs (I) = 30

Number of external outputs (O) = 60

Number of external inquiries (E) = 23

Number of files (F) = 08

Number of external interfaces (N) = 02

It is given that the complexity weighting factors for I, O, E, F and N are 4, 5, 4, 10 and 7, respectively. It is also given that, out of fourteen value adjustment factors that influence the development effort, four factors are not applicable, each of the other four factors have value 3, and each of the remaining factors have value 4. The computed value of function point metric is _____________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 612 to 613

Solutions and video are in the course

Question 18 · 1 mark Q3447

In a web server, ten WebPages are stored with the URLs of the form http://www.yourname.com/var.html; where, var is a different number from 1 to 10 for each Webpage. Suppose, the client stores the Webpage with var = 1 (say W1) in local machine, edits and then tests. Rest of the WebPages remains on the web server. W1 contains several relative URLs of the form “var.html” referring to the other WebPages. Which one of the following statements needs to be added in W1, so that all the relative URLs in W1 refer to the appropriate WebPages on the web server?

  1. A.

    <a href: “http://www.yourname.com/”, href: “...var.html”>

  2. B.

    <base href: “http://www.yourname.com/”>

  3. C.

    <a href: “http://www.yourname.com/”>

  4. D.

    <base href: “http://www.yourname.com/”, range:“…var.html”>

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 19 · 1 mark Q3448

Consider the following statements.

I. TCP connections are full duplex

II. TCP has no option for selective acknowledgement

III. TCP connections are message streams

  1. A.

    Only I is correct

  2. B.

    Only I and III are correct

  3. C.

    Only II and III are correct

  4. D.

    All of I, II and III are correct

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): A

Solutions and video are in the course

Question 20 · 1 mark Q3449

Consider the equality ∑i=0ni3=X\displaystyle{\sum_{i=0}^n} i^3 = X and the following choices for XX

 I.    Θ(n4)\Theta(n^4)

II.    Θ(n5)\Theta(n^5)

III.    O(n5)O(n^5)

IV.    Ω(n3)\Omega(n^3)

The equality above remains correct if XX is replaced by

  1. A.

    Only I

  2. B.

    Only II

  3. C.

    I or III or IV but not II

  4. D.

    II or III or IV but not I

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 21 · 1 mark Q3450

Consider a binary tree T that has 200 leaf nodes. Then, the number of nodes in T that have exactly two children are ________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 199

Solutions and video are in the course

Question 22 · 1 mark Q3451

Given a hash table 𝑇 with 25 slots that stores 2000 elements, the load factor 𝛼 for 𝑇 is ____________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 80

Solutions and video are in the course

Question 23 · 1 mark Q3452

In the given matrix  [1−12010121]\begin{bmatrix} 1 & -1 & 2 \\ 0 & 1 & 0 \\ 1 & 2 & 1 \end{bmatrix} , one of the eigenvalues is 1. The eigenvectors corresponding to the eigenvalue 1 are

  1. A.

    {a(4,2,1)∣a≠0,a∈R}\left\{a\left(4,2,1\right) \mid a \neq 0, a \in \mathbb{R}\right\}

  2. B.

    {a(−4,2,1)∣a≠0,a∈R}\left\{a\left(-4,2,1\right) \mid a \neq 0, a \in \mathbb{R}\right\}

  3. C.

    {a(2,0,1)∣a≠0,a∈R}\left\{a\left(\sqrt{2},0,1\right) \mid a \neq 0, a \in \mathbb{R}\right\}

  4. D.

    {a(−2,0,1)∣a≠0,a∈R}\left\{a\left(- \sqrt{2},0,1\right) \mid a \neq 0, a \in \mathbb{R}\right\}

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 24 · 1 mark Q3453

The value of lim⁡x→∞(1+x2)e−x\displaystyle \lim_{x \rightarrow \infty} (1+x^2)^{e^{-x}} is

  1. A.

    00

  2. B.

    12\frac {1} {2}

  3. C.

    11

  4. D.

    ∞\infty

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 25 · 1 mark Q3454

The number of 4 digit numbers having their digits in non-decreasing order (from left to right) constructed by using the digits belonging to the set {1, 2, 3} is____________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 15

Solutions and video are in the course

Question 26 · 1 mark Q3455

In a room there are only two types of people, namely Type 1 and Type 2. Type 1 people always tell the truth and Type 2 people always lie. You give a fair coin to a person in that room, without knowing which type he is from and tell him to toss it and hide the result from you till you ask for it. Upon asking, the person replies the following

“The result of the toss is head if and only if I am telling the truth.”

Which of the following options is correct?

  1. A.

    The result is head

  2. B.

    The result is tail

  3. C.

    If the person is of Type 2, then the result is tail

  4. D.

    If the person is of Type 1, then the result is tail

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): A

Solutions and video are in the course

Question 27 · 1 mark Q3456

While inserting the elements 71, 65, 84, 69, 67, 83 in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is

  1. A.

    65    

  2. B.

    67

  3. C.

    69

  4. D.

    83

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 28 · 1 mark Q3457

The result evaluating the postfix expression 10 5 + 60 6 / * 8 − is

  1. A.

    284    

  2. B.

    213

  3. C.

    142

  4. D.

    71

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 29 · 1 mark Q3458

Consider the following relation

Cinema(theater, address, capacity)

Which of the following options will be needed at the end of the SQL query

SELECT P1.address
FROM Cinema P1

such that it always finds the addresses of theaters with maximum capacity?

  1. A.

    WHERE P1.capacity >= All (select P2.capacity from Cinema P2)

  2. B.

    WHERE P1.capacity >= Any (select P2.capacity from Cinema P2)

  3. C.

    WHERE P1.capacity > All (select max(P2.capacity) from Cinema P2)

  4. D.

    WHERE P1.capacity > Any (select max(P2.capacity) from Cinema P2)

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): A

Solutions and video are in the course

Question 30 · 1 mark Q3459

Consider the following array of elements.

〈89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100〉

The minimum number of interchanges needed to convert it into a max-heap is

  1. A.

    4

  2. B.

    5

  3. C.

    2

  4. D.

    3

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): D

Solutions and video are in the course

Question 31 · 1 mark Q3460

Two processes 𝑋 and 𝑌 need to access a critical section. Consider the following synchronization construct used by both the processes

Here, varP and varQ are shared variables and both are initialized to false. Which one of the following statements is true?

  1. A.

    The proposed solution prevents deadlock but fails to guarantee mutual exclusion

  2. B.

    The proposed solution guarantees mutual exclusion but fails to prevent deadlock

  3. C.

    The proposed solution guarantees mutual exclusion and prevents deadlock

  4. D.

    The proposed solution fails to prevent deadlock and fails to guarantee mutual exclusion

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): A

Solutions and video are in the course

Question 32 · 1 mark Q3461

Let LL be the language represented by the regular expression Σ∗0011Σ∗Σ^∗0011Σ^∗where Σ={0,1}Σ = \{0, 1\}. What is the minimum number of states in a DFA that recognizes L‾\overline L (complement of LL)?

  1. A.

    4

  2. B.

    5

  3. C.

    6

  4. D.

    8

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 33 · 1 mark Q3462

Consider a software program that is artificially seeded with 100 faults. While testing this program, 159 faults are detected, out of which 75 faults are from those artificially seeded faults. Assuming that both real and seeded faults are of same nature and have same distribution, the estimated number of undetected real faults is ____________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 28

Solutions and video are in the course

Question 34 · 1 mark Q3463

Consider a machine with a byte addressable main memory of 2^20 bytes, block size of 16 bytes and a direct mapped cache having 2^12 cache lines. Let the addresses of two consecutive bytes in main memory be (E201F)16 and (E2020)16. What are the tag and cache line address (in hex) for main memory address (E201F)16?

  1. A.

    E, 201

  2. B.

    F, 201

  3. C.

    E, E20

  4. D.

    2, 01F

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): A

Solutions and video are in the course

Question 35 · 1 mark Q3464

Consider a CSMA/CD network that transmits data at a rate of 100 Mbps (10^8 bits per second) over a 1 km (kilometer) cable with no repeaters. If the minimum frame size required for this network is 1250 bytes, what is the signal speed (km/sec) in the cable?

  1. A.

    8000

  2. B.

    10000

  3. C.

    16000

  4. D.

    20000

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): D

Solutions and video are in the course

Question 36 · 2 marks Q3465

The velocity v (in kilometer/minute) of a motorbike which starts from rest, is given at fixed intervals of time t (in minutes) as follows:

t

2

4

6

8

10

12

14

16

18

20

v

10

18

25

29

32

20

11

5

2

0

The approximate distance (in kilometers) rounded to two places of decimals covered in 20 minutes using Simpson’s 1/3rd rule is _______________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 308 to 310 km

Solutions and video are in the course

Question 37 · 2 marks Q3466

Assume that a mergesort algorithm in the worst case takes 30 seconds for an input of size 64. Which of the following most closely approximates the maximum input size of a problem that can be solved in 6 minutes?

  1. A.

    256

  2. B.

    512

  3. C.

    1024

  4. D.

    2048

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 38 · 2 marks Q3467

Consider the following recursive C function.

void get(int n)
{
    if (n < 1) return;
    get(n - 1);
    get(n - 3);
    printf("%d", n);
}

If get(6) function is being called in main() then how many times will the get() function be invoked before returning to the main()?

  1. A.

    15

  2. B.

    25

  3. C.

    35

  4. D.

    45

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 39 · 2 marks Q3468

Consider a B+ tree in which the search key is 12 bytes long, block size is 1024 bytes, record pointer is 10 bytes long and block pointer is 8 bytes long. The maximum number of keys that can be accommodated in each non-leaf node of the tree is ____________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 50

Solutions and video are in the course

Question 40 · 2 marks Q3469

Given the function 𝐹 = 𝑃′ + 𝑄𝑅, where 𝐹 is a function in three Boolean variables 𝑃,𝑄 and 𝑅 and 𝑃′ = ! 𝑃 , consider the following statements.

(S1) 𝐹 = ∑(4, 5, 6)

(S2) 𝐹 = ∑(0, 1, 2, 3, 7)

(S3) 𝐹 = ∏(4, 5, 6)

(S4) 𝐹 = ∏(0, 1, 2, 3, 7)

Which of the following is true?

  1. A.

    (S1)- False, (S2)- True, (S3)- True, (S4)- False

  2. B.

    (S1)- True, (S2)- False, (S3)- False, (S4)- True

  3. C.

    (S1)- False, (S2)- False, (S3)- True, (S4)- True

  4. D.

    (S1)- True, (S2)- True, (S3)- False, (S4)- False

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): A

Solutions and video are in the course

Question 41 · 2 marks Q3470

Language L1L_1 is polynomial time reducible to language L2L_2 . Language L3L_3 is polynomial time reducible to L2L_2, which in turn is polynomial time reducible to language L4L_4 . Which of the following is/are true?

I. if  L4∈PL_4 ∈ P , then L2∈PL_2 ∈ P

II. if L1∈PL_1 ∈ P or L3∈PL_3 ∈ P , then L2∈PL_2 ∈ P

III. L1∈PL_1 ∈ P , if and only if L3∈PL_3 ∈ P

IV. if L4∈PL_4 ∈ P , then L1∈PL_1 ∈ P and L3∈PL_3 ∈ P

  1. A.

    II only

  2. B.

    III only

  3. C.

    I and IV only

  4. D.

    I only

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 42 · 2 marks Q3471

Consider the following C program.

#include<stdio.h>
int f1(void);
int f2(void);
int f3(void);
int x = 10;

int main()
{
    int x = 1;
    x += f1() + f2() + f3() + f2();
    printf("%d", x);
    return 0;
}

int f1() { int x = 25; x++; return x; }
int f2() { static int x = 50; x++; return x; }
int f3() { x *= 10; return x; }

The output of the program is ________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 230

Solutions and video are in the course

Question 43 · 2 marks Q3472

Consider the following C program.

#include<stdio.h>
int main()
{
    static int a[] = {10, 20, 30, 40, 50};
    static int *p[] = {a, a+3, a+4, a+1, a+2};
    int **ptr = p;
    ptr++;
    printf("%d%d", ptr-p, **ptr);
}

The output of the program is ______________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 140

Solutions and video are in the course

Question 44 · 2 marks Q3473

Which of the following languages are context-free?

L1={ambnanbm∣m,n≥1}L_1 = \{a^mb^n a^n b^m | m, n ≥ 1 \}

L2={ambnambn∣m,n≥1}L_2 = \{a^mb^n a^mb^n | m, n ≥ 1\}

L3={ambn∣m=2n+1}L_3 = \{a^mb^n | m = 2n + 1 \}

  1. A.

    L1L_1 and L2L_2 only

  2. B.

    L1L_1 and L3L_3 only

  3. C.

    L2L_2 and L3L_3 only

  4. D.

    L3L_3 only

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 45 · 2 marks Q3474

Consider the following policies for preventing deadlock in a system with mutually exclusive resources.

I. Processes should acquire all their resources at the beginning of execution. If any resource is not available, all resources acquired so far are released

II. The resources are numbered uniquely, and processes are allowed to request for resources only in increasing resource numbers

III. The resources are numbered uniquely, and processes are allowed to request for resources only in decreasing resource numbers

IV. The resources are numbered uniquely. A process is allowed to request only for a resource with resource number larger than its currently held resources

Which of the above policies can be used for preventing deadlock?

  1. A.

    Any one of I and III but not II or IV

  2. B.

    Any one of I, III, and IV but not II

  3. C.

    Any one of II and III but not I or IV

  4. D.

    Any one of I, II, III, and IV

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): D

Solutions and video are in the course

Question 46 · 2 marks Q3475

In the network 200.10.11.144/27, the fourth octet (in decimal) of the last IP address of the network which can be assigned to a host is ____________

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 158

Solutions and video are in the course

Question 47 · 2 marks Q3476

Consider a network connecting two systems located 8000 kilometers apart. The bandwidth of the network is 500×10^6 bits per second. The propagation speed of the media is 4×10^6 meters per second. It is needed to design a Go-Back-𝑁 sliding window protocol for this network. The average packet size is 10^7 bits. The network is to be used to its full capacity. Assume that processing delays at nodes are negligible. Then, the minimum size in bits of the sequence number field has to be ___________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 8

Solutions and video are in the course

Question 48 · 2 marks Q3477

Consider the following reservation table for a pipeline having three stages 𝑆1, 𝑆2 and 𝑆3.

The minimum average latency (MAL) is ________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 3 clock cycles

Solutions and video are in the course

Question 49 · 2 marks Q3478

Consider the following code sequence having five instructions I₁ to I₅. Each of these instructions has the following format.

OP Ri, Rj, Rk

where operation OP is performed on contents of registers Rj and Rk and the result is stored in register Ri.

I₁: ADD R1, R2, R3
I₂: MUL R7, R1, R3
I₃: SUB R4, R1, R5
I₄: ADD R3, R2, R4
I₅: MUL R7, R8, R9

Consider the following three statements.

S1: There is an anti-dependence between instructions I₂ and I₅

S2: There is an anti-dependence between instructions I₂ and I₄

S3: Within an instruction pipeline an anti-dependence always creates one or more stalls

Which one of above statements is/are correct?

  1. A.

    Only S1 is true

  2. B.

    Only S2 is true

  3. C.

    Only S1 and S3 are true

  4. D.

    Only S2 and S3 are true

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 50 · 2 marks Q3479

Consider the following two C code segments. Y and X are one- and two-dimensional arrays of size n and n x n respectively, where 2 <= n <= 10. Assume that in both code segments, elements of Y are initialized to 0 and each element X[i][j] of array X is initialized to i+j. Further assume that when stored in main memory all elements of X are in the same main memory page frame.

Code segment 1:

// initialize elements of Y to 0
// initialize elements of X[i][j] of X to i+j
for (i=0; i<n; i++)
    Y[i] += X[0][i];

Code segment 2:

// initialize elements of Y to 0
// initialize elements of X[i][j] of X to i+j
for (i=0; i<n; i++)
    Y[i] += X[i][0];

Which of the following statements is/are correct?

S1: Final contents of array Y will be same in both code segments

S2: Elements of array X accessed inside the for loop shown in code segment 1 are contiguous in main memory

S3: Elements of array X accessed inside the for loop shown in code segment 2 are contiguous in main memory

  1. A.

    Only S2 is correct

  2. B.

    Only S3 is correct

  3. C.

    Only S1 and S2 are correct

  4. D.

    Only S1 and S3 are correct

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 51 · 2 marks Q3480

Consider the following partial Schedule SS involving two transactions T1T1 and T2T2. Only the readread and the writewrite operations have been shown. The readread operation on data item PP is denoted by read(P)read(P) and the write operation on data item PP is denoted by write(P)(P).

Suppose that the transaction T1T1 fails immediately after time instance 9. Which one of the following statements is correct?

  1. A.

    T2T2 must be aborted and then both T1T1 and T2T2 must be re-started to ensure transaction atomicity

  2. B.

    Schedule SS is non-recoverable and cannot ensure transaction atomicity

  3. C.

    Only T2T2 must be aborted and then re-started to ensure transaction atomicity

  4. D.

    Schedule SS is recoverable and can ensure atomicity and nothing else needs to be done

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 52 · 2 marks Q3481

If the following system has non-trivial solution,

px+qy+rz=0px + qy + rz = 0

qx+ry+pz=0qx + ry + pz = 0

rx+py+qz=0rx + py + qz = 0

then which one of the following options is TRUE?

  1. A.

    p−q+r=0 or p=q=−rp - q + r = 0 \text{ or } p = q = -r

  2. B.

    p+q−r=0 or p=−q=rp + q - r = 0 \text{ or } p = -q = r

  3. C.

    p+q+r=0 or p=q=rp + q + r = 0 \text{ or } p = q = r

  4. D.

    p−q+r=0 or p=−q=−rp - q + r = 0 \text{ or } p = -q = -r

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 53 · 2 marks Q3482

Consider the following C program:

#include<stdio.h>
int main()
{
    int i, j, k = 0;
    j = 2 * 3 / 4 + 2.0 / 5 + 8 / 5;
    k -= --j;
    for (i = 0; i < 5; i++)
    {
        switch (i + k)
        {
            case 1:
            case 2: printf("\n%d", i+k);
            case 3: printf("\n%d", i+k);
            default: printf("\n%d", i+k);
        }
    }
    return 0;
}

The number of times printf statement is executed is ____________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 10

Solutions and video are in the course

Question 54 · 2 marks Q3483

If for non-zero x, af(x)+bf(1x)=1x−25x, \: af(x) + bf(\frac{1}{x}) = \frac{1}{x} - 25 where a≠b then ∫12f(x)dxa \neq b \text{ then } \int\limits_1^2 f(x)dx is

  1. A.

    1a2−b2[a(ln⁡2−25)+47b2]\frac{1}{a^2 - b^2} \begin{bmatrix} a(\ln 2 - 25) + \frac{47b}{2} \end{bmatrix}

  2. B.

    1a2−b2[a(2ln⁡2−25)−47b2]\frac{1}{a^2 - b^2} \begin{bmatrix} a(2\ln 2 - 25) - \frac{47b}{2} \end{bmatrix}

  3. C.

    1a2−b2[a(2ln⁡2−25)+47b2]\frac{1}{a^2 - b^2} \begin{bmatrix} a(2\ln 2 - 25) + \frac{47b}{2} \end{bmatrix}

  4. D.

    1a2−b2[a(ln⁡2−25)−47b2]\frac{1}{a^2 - b^2} \begin{bmatrix} a(\ln 2 - 25) - \frac{47b}{2} \end{bmatrix}

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): A

Solutions and video are in the course

Question 55 · 2 marks Q3484

Let GG be a connected undirected graph of 100 vertices and 300 edges. The weight of a minimum spanning tree of GG is 500. When the weight of each edge of GG is increased by five, the weight of a minimum spanning tree becomes ________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 995

Solutions and video are in the course

Question 56 · 2 marks Q3485

Two hosts are connected via a packet switch with 10^7 bits per second links. Each link has a propagation delay of 20 microseconds. The switch begins forwarding a packet 35 microseconds after it receives the same. If 10000 bits of data are to be transmitted between the two hosts using a packet size of 5000 bits, the time elapsed between the transmission of the first bit of data and the reception of the last bit of the data in microseconds is____________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 1575 microseconds

Solutions and video are in the course

Question 57 · 2 marks Q3486

For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?

Process

Arrival Time

Processing Time

A

0

3

B

1

6

C

4

4

D

6

2

  1. A.

    First Come First Serve

  2. B.

    Non-preemptive Shortest Job First

  3. C.

    Shortest Remaining Time

  4. D.

    Round Robin with Quantum value two

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 58 · 2 marks Q3487

Consider three software items: Program-𝑋, Control Flow Diagram of Program-𝑌 and Control Flow Diagram of Program-𝑍 as shown below

The values of McCabe’s Cyclomatic complexity of Program-𝑋, Program-𝑌, and Program-𝑍 respectively are

  1. A.

    4, 4, 7

  2. B.

    3, 4, 7

  3. C.

    4, 4, 8

  4. D.

    4, 3, 8

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): A

Solutions and video are in the course

Question 59 · 2 marks Q3488

Consider the equation (43)x(43)_x = (y3)8(y3)_8 where 𝑥 and 𝑦 are unknown. The number of possible solutions is ______________

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 5

Solutions and video are in the course

Question 60 · 2 marks Q3489

Let RR be a relation on the set of ordered pairs of positive integers such that ((p,q),(r,s))ϵR((p,q),(r,s)) ϵ R if and only if p−s=q−rp− s = q− r. Which one of the following is true about RR?

  1. A.

    Both reflexive and symmetric

  2. B.

    Reflexive but not symmetric

  3. C.

    Not reflexive but symmetric

  4. D.

    Neither reflexive nor symmetric

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 61 · 2 marks Q3490

Suppose 𝑋𝑖 for 𝑖 = 1,2,3 are independent and identically distributed random variables whose probability mass functions are Pr[𝑋𝑖 = 0] = Pr[𝑋𝑖 = 1] = 1/2 for 𝑖 = 1, 2, 3. Define another random variable 𝑌 = 𝑋1𝑋2 ⊕ 𝑋3, where ⊕ denotes XOR.

Then Pr[𝑌 = 0|𝑋3 = 0] =_______________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 0.75

Solutions and video are in the course

Question 62 · 2 marks Q3491

The total number of prime implicants of the function 𝑓(𝑤, 𝑥, 𝑦, 𝑧) = ∑(0, 2, 4, 5, 6, 10) is _______.

Official answer key

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

Solutions and video are in the course

Question 63 · 2 marks Q3492

Suppose 𝑐 = 〈𝑐[0], … , 𝑐[𝑘 − 1]〉 is an array of length 𝑘, where all the entries are from the set {0, 1}. For any positive integers 𝑎 and 𝑛, consider the following pseudocode.

image.png



If 𝑘 = 4, 𝑐 = 〈1, 0, 1, 1〉, 𝑎 = 2 and 𝑛 = 8, then the output of DOSOMETHING(𝑐, 𝑎, 𝑛) is __________________.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 0

Solutions and video are in the course

Question 64 · 2 marks Q3493

Let 𝑓(𝑛)=𝑛𝑓(𝑛) = 𝑛 and 𝑔(𝑛)=𝑛(1+sin 𝑛)𝑔(𝑛) = 𝑛^{(1+ sin \ 𝑛)} , where 𝑛𝑛 is a positive integer. Which of the following statements is/are correct?

I. 𝑓(𝑛) = 𝑂(𝑔(𝑛))

II. 𝑓(𝑛) = Ω(𝑔(𝑛))

  1. A.

    Only I

  2. B.

    Only II

  3. C.

    Both I and II

  4. D.

    Neither I nor II

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): D

Solutions and video are in the course

Question 65 · 2 marks Q3494

Consider the following grammar 𝐺

𝑆 → 𝐹 | 𝐻

𝐹 → 𝑝 | 𝑐

𝐻 → 𝑑 | 𝑐

where 𝑆, 𝐹, and 𝐻 are non-terminal symbols, 𝑝, 𝑑, and 𝑐 are terminal symbols. Which of the following statement(s) is/are correct?

S1. LL(1) can parse all strings that are generated using grammar 𝐺

S2. LR(1) can parse all strings that are generated using grammar 𝐺

  1. A.

    Only S1

  2. B.

    Only S2

  3. C.

    Both S1 and S2

  4. D.

    Neither S1 nor S2

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): D

Solutions and video are in the course

Question 1 · 1 mark Q3430

Extreme focus on syllabus and studying for tests has become such a dominant concern of Indian students that they close their minds to anything ________ to the requirements of the exam.

  1. A.

    related

  2. B.

    extraneous

  3. C.

    outside

  4. D.

    useful

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 2 · 1 mark Q3431

Select the pair that best expresses a relationship similar to that expressed in the pair:

Children : Pediatrician

  1. A.

    Adult : Orthopaedist

  2. B.

    Females : Gynaecologist

  3. C.

    Kidney : Nephrologist

  4. D.

    Skin : Dermatologist

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 3 · 1 mark Q3432

The Tamil version of ________ John Abraham-starrer Madras Cafe _____ cleared by the Censor Board with no cuts last week, but the film’s distributors ______ no takers among the exhibitors for a release in Tamil Nadu _________ this Friday.

  1. A.

    Mr., was, found, on

  2. B.

    a, was, found, at

  3. C.

    the, was, found, on

  4. D.

    a, being, find at

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 4 · 1 mark Q3433

If ROAD is written as URDG, then SWAN should be written as:

  1. A.

    VXDQ

  2. B.

    VZDQ

  3. C.

    VZDP

  4. D.

    UXDQ

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 5 · 1 mark Q3434

A function f(x)f(x) is linear and has a value of 29 at xx = –2 and 39 at xx = 3. Find its value at xx = 5.

  1. A.

    59

  2. B.

    45

  3. C.

    43

  4. D.

    35

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): C

Solutions and video are in the course

Question 6 · 2 marks Q3435

Alexander turned his attention towards India, since he had conquered Persia.

Which one of the statements below is logically valid and can be inferred from the above sentence?

  1. A.

    Alexander would not have turned his attention towards India had he not conquered Persia.

  2. B.

    Alexander was not ready to rest on his laurels, and wanted to march to India.

  3. C.

    Alexander was completely in control of his army and could command it to move towards India.

  4. D.

    Since Alexander’s kingdom extended to Indian borders after the conquest of Persia, he was keen to move further.

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): A

Solutions and video are in the course

Question 7 · 2 marks Q3436

Most experts feel that in spite of possessing all the technical skills required to be a batsman of the highest order, he is unlikely to be so due to lack of requisite temperament. He was guilty of throwing away his wicket several times after working hard to lay a strong foundation. His critics pointed out that until he addressed this problem, success at the highest level will continue to elude him.

Which of the statement(s) below is/are logically valid and can be inferred from the above passage?

(i) He was already a successful batsman at the highest level.
(ii) He has to improve his temperament in order to become a great batsman.
(iii) He failed to make many of his good starts count.
(iv) Improving his technical skills will guarantee success.

  1. A.

    (iii) and (iv)

  2. B.

    (ii) and (iii)

  3. C.

    (i), (ii) and (iii)

  4. D.

    (ii) only

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 8 · 2 marks Q3437

The exports and imports (in crores of Rs.) of a country from the year 2000 to 2007 are given in the following bar chart. In which year is the combined percentage increase in imports and exports the highest?

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): 2006 year

Solutions and video are in the course

Question 9 · 2 marks Q3438

Choose the most appropriate equation for the function drawn as a thick line, in the plot below.

  1. A.

    x=y−∣y∣x=y-|y|

  2. B.

    x=−(y−∣y∣)x=-(y-|y|)

  3. C.

    x=y+∣y∣x=y+|y|

  4. D.

    x=−(y+∣y∣)x=-(y+|y|)

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course

Question 10 · 2 marks Q3439

The head of a newly formed government desires to appoint five of the six selected members P, Q, R, S, T and U to portfolios of Home, Power, Defense, Telecom, and Finance. U does not want any portfolio if S gets one of the five. R wants either Home or Finance or no portfolio. Q says that if S gets either Power or Telecom, then she must get the other one. T insists on a portfolio if P gets one.

Which is the valid distribution of portfolios?

  1. A.

    P-Home, Q-Power, R-Defense, S-Telecom, T-Finance

  2. B.

    R-Home, S-Power, P-Defense, Q-Telecom, T-Finance

  3. C.

    P-Home, Q-Power, T-Defense, S-Telecom, U-Finance

  4. D.

    Q-Home, U-Power, T-Defense, R-Telecom, P-Finance

Official answer key

Official answer key (GATE Computer Science & IT 2015 GATE 2015 · CS · Set 3): B

Solutions and video are in the course