GATE CS — Computer Science & IT 2017 Previous year paper

GATE CS 2017 — Previous Year Questions

  • 15Questions
  • 25Total marks
  • 45Minutes

The questions from the GATE 2017 Computer Science paper that are in the W3Colleges verified bank. This is a partial paper, not the full 65-question original — import the complete paper to fill it out.

Start timed test Practice without timer

The timed run lasts 45 minutes and is held on the server.

Questions

GATE CS 2017

Question 1

NAT 2 marks · no negative Algorithms

A message is made up entirely of characters from the set \(X = \{P, Q, R, S, T\}\). The table of probabilities for each of the characters is shown below.

CharacterProbability
P0.22
Q0.34
R0.17
S0.19
T0.08
Total1.00

If a message of 100 characters over \(X\) is encoded using Huffman coding, then the expected length of the encoded message in bits is ______.

Answers and explanations are free — they just need an account.

Question 2

MCQ 1 marks · −0.33 Compiler Design

Consider the following grammar:

P → x Q R S
Q → y z | z
R → w | ε
S → y

What is FOLLOW(Q)?

Answers and explanations are free — they just need an account.

Question 3

MCQ 1 marks · −0.33 Computer Networks

Consider a TCP client and a TCP server running on two different machines. After completing data transfer, the TCP client calls close to terminate the connection and a FIN segment is sent to the TCP server. The server-side TCP responds by sending an ACK, which is received by the client-side TCP. As per the TCP connection state diagram (RFC 793), in which state does the client-side TCP connection wait for the FIN from the server-side TCP?

Answers and explanations are free — they just need an account.

Question 4

NAT 2 marks · no negative Computer Organization and Architecture

Consider a two-level cache hierarchy with L1 and L2 caches. An application incurs 1.4 memory accesses per instruction on average. For this application, the miss rate of L1 cache is 0.1; the L2 cache experiences, on average, 7 misses per 1000 instructions. The miss rate of L2 expressed correct to two decimal places is ______.

Answers and explanations are free — they just need an account.

Question 5

MCQ 2 marks · −0.66 Databases

The following functional dependencies hold true for the relational schema \(R\{V, W, X, Y, Z\}\):

V  -> W
VW -> X
Y  -> VX
Y  -> Z

Which of the following is irreducible equivalent for this set of functional dependencies?

Answers and explanations are free — they just need an account.

Question 6

MCQ 1 marks · −0.33 Digital Logic

Consider the Boolean operator \(\#\) with the following properties:

\(x \# 0 = x\),   \(x \# 1 = \overline{x}\),   \(x \# x = 0\)   and   \(x \# \overline{x} = 1\).

Then \(x \# y\) is equivalent to:

Answers and explanations are free — they just need an account.

Question 8

MCQ 2 marks · −0.66 Engineering Mathematics

If \(f(x) = R\sin\left(\dfrac{\pi x}{2}\right) + S\), \(f'\left(\dfrac{1}{2}\right) = \sqrt{2}\) and \(\displaystyle\int_{0}^{1} f(x)\,dx = \dfrac{2R}{\pi}\), then the constants \(R\) and \(S\) are respectively

Answers and explanations are free — they just need an account.

Question 9

NAT 2 marks · no negative Engineering Mathematics

If the characteristic polynomial of a \(3\times 3\) matrix \(M\) over \(\mathbb{R}\) (the set of real numbers) is \(\lambda^{3} - 4\lambda^{2} + a\lambda + 30\), \(a \in \mathbb{R}\), and one eigenvalue of \(M\) is \(2\), then the largest among the absolute values of the eigenvalues of \(M\) is ______.

Answers and explanations are free — they just need an account.

Question 10

MCQ 1 marks · −0.33 General Aptitude

The ninth and the tenth of this month are Monday and Tuesday ________.

Choose the word that best fills the blank.

Answers and explanations are free — they just need an account.

Question 11

MCQ 2 marks · −0.66 General Aptitude

A jar contains a mixture of 175 ml water and 700 ml alcohol. Gopal takes out 10% of the mixture and substitutes it by water of the same amount. The process is repeated once again.

The percentage of water in the mixture is ________.

Answers and explanations are free — they just need an account.

Question 12

NAT 2 marks · no negative Operating Systems

Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below:

ProcessArrival timeBurst time
P107
P233
P355
P462

If the pre-emptive shortest remaining time first scheduling algorithm is used to schedule the processes, then the average waiting time across all processes is _______ milliseconds.

Answers and explanations are free — they just need an account.

Question 13

MCQ 2 marks · −0.66 Probability and Statistics

\(P\) and \(Q\) are considering to apply for a job. The probability that \(P\) applies for the job is \(\dfrac{1}{4}\), the probability that \(P\) applies for the job given that \(Q\) applies for the job is \(\dfrac{1}{2}\), and the probability that \(Q\) applies for the job given that \(P\) applies for the job is \(\dfrac{1}{3}\). Then the probability that \(P\) does not apply for the job given that \(Q\) does not apply for the job is

Answers and explanations are free — they just need an account.

Question 14

NAT 2 marks · no negative Programming and Data Structures

Consider the following C program:

#include <stdio.h>

int *A, stkTop;

int stkFunc(int opcode, int val) {
    static int size = 0, stkTop = 0;
    switch (opcode) {
        case -1: size = val; break;
        case  0: if (stkTop < size) A[stkTop++] = val; break;
        default: if (stkTop) return A[--stkTop];
    }
    return -1;
}

int main() {
    int B[20];
    A = B;
    stkTop = -1;
    stkFunc(-1, 10);
    stkFunc(0, 5);
    stkFunc(0, 10);
    printf("%d\n", stkFunc(1, 0) + stkFunc(1, 0));
    return 0;
}

The value printed by the program is ______.

Answers and explanations are free — they just need an account.

Question 15

NAT 1 marks · no negative Theory of Computation

Consider the language \(L\) given by the regular expression \((a+b)^*b(a+b)\) over the alphabet \(\{a,b\}\). The smallest number of states needed in a deterministic finite-state automaton (DFA) accepting \(L\) is ______.

Answers and explanations are free — they just need an account.