CS/IT Gate Yearwise
CS/IT Gate 2022
CS/IT Gate 2021
CS/IT Gate 2020
CS/IT Gate 2019
CS/IT Gate 2018
CS/IT Gate 2017 (Set 1)
CS/IT Gate 2017 (Set 2)
CS/IT Gate 2016 (Set 1)
CS/IT Gate 2016 (Set 2)
CS/IT Gate 2015 (Set 1)
CS/IT Gate 2015 (Set 2)
CS/IT Gate 2015 (Set 3)
CS/IT Gate 2014 (Set 1)
CS/IT Gate 2014 (Set 2)
CS/IT Gate 2014 (Set 3)
Computer Science Gate 2015 Set 1 Questions
Ques 1Automata
For any two languages L1 and L2 such that L1 is context free and L2 is recursively enumerable but not recursive, which of the following is/are necessarily true?
II. L2' (complement of L2) is recursive
III. L1' is context-free
IV. L1' ∪ L2 is recursively enumerable
a) I only
b) III only
c) III and IV only
d) I and IV only
CFG is the correct answer.
Ques 2C
The output of the following C program is __________.
{
int c;
c=a; a=b; b=c;
}
void f2 (int *a, int *b)
{
int c;
c=*a; *a=*b;*b=c;
}
int main()
{
int a=4, b=5, c=6;
f1(a, b);
f2(&b, &c);
printf (“%d”, c-a-b);
return 0;
}
a is the correct answer.
Ques 3C
Which of following statements is/are False?
I. XML overcomes the limitations in HTML
to support a structured way of organizing content.
II. XML specification is not case sensitive while
HTML specification is case sensitive.
III. XML supports user defined tags while HTML
uses pre-defined tags.
IV. XML tags need not be closed while HTML
tags must be closed.
a) II only
b) I only
c) I and IV only
d) III and IV only
1 is the correct answer.
Ques 4COA
Consider a system with byte-addressable memory, 32 bit logical addresses, 4 kilobyte page size and page table entries of 4 bytes each. The size of the page table in the system in megabytes is_________
a is the correct answer.
Ques 5COA
For computers based on three-address instruction formats, each address field can be used to specify which of the following:
S1: A memory operand
S2: A processor register
S3: An implied accumulator register
a) Either S1 or S2
b) Either S2 or 3
c) Only S2 and 3
d) All of S1, S2 and S3
Addressing Modes is the correct answer.
Ques 6Compiler
Which one of the following is True at any valid state in shift-reduce parsing?
a) Viable prefixes appear only at the bottom of the stack and not inside
b) Viable prefixes appear only at the top of the stack and not inside
c) The stack contains only a set of viable prefixes
d) The stack never contains viable prefixes
Parsing is the correct answer.
Ques 7Computer Network
Consider a LAN with four nodes S1, S2, S3 and S4. Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision is said to have occurred if more than one node transmit in the same slot. The probabilities of generation of a frame in a time slot by S1, S2, S3 and S4 are 0.1, 0.2, 0.3 and 0.4, respectively. The probability of sending a frame in the first slot without any collision by any of these four stations is_________
a is the correct answer.
Ques 8Computer Network
Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are False with respect to the TCP connection?
I. If the sequence number of a segment is m, then the sequence
number of the subsequent segment is always m+1.
II. If the estimated round trip time at any given point of time
is t sec, the value of the retransmission timeout is always
set to greater than or equal to t sec.
III. The size of the advertised window never changes during the
course of the TCP connection.
IV. The number of unacknowledged bytes at the sender is always
less than or equal to the advertised window.
a is the correct answer.
Ques 9Computer Network
Which one of the following fields of an IP header is NOT modified by a typical IP router?
a) Checksum
b) Source address
c) Time to Live (TTL)
d) Length
IP Address is the correct answer.
Ques 10Computer Network
Suppose that everyone in a group of N people wants to communicate secretly with the N–1 others using symmetric key cryptographic system. The communication between any two persons should not be decodable by the others in the group. The number of keys required in the system as a whole to satisfy the confidentiality requirement is
a) 2N
b) N(N – 1)
c) N(N – 1)/2
d) (N – 1)2
Cryptography is the correct answer.
Ques 11Computer Network
In one of the pairs of protocols given below, both the protocols can use multiple TCP connections between the same client and the server. Which one is that?
a) HTTP, FTP
b) HTTP, TELNET
c) FTP, SMTP
d) HTTP, SMTP
TCP IP is the correct answer.
Ques 12DAA
Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n ( ≥ 2) numbers? In the recurrence equations given in the options below, c is a constant.
a) T(n)=2T(n/2)+cn
b) T(n)=T(n–1)+T(0)+cn
c) T(n)=2T(n–2)+cn
d) T(n)=T(n/2)+cn
Complexity is the correct answer.
Ques 13DAA
Match the following
(P) Prim’s algorithm for minimum spanning tree | (i) Backtracking |
(Q) Floyd-Warshall algorithm for all pairs shortest paths | (ii) Greedy method |
(R) Mergesort | (iii) Dynamic programming |
(S) Hamiltonian circuit | (iv) Divide and conquer |
a) P-iii, Q-ii, R-iv, S-i
b) P-i, Q-ii, R-iv, S-iii
c) P-ii, Q-iii, R-iv, S-i
d) P-ii, Q-i, R-iii, S-iv
Algorithms is the correct answer.
Ques 14Data Structure
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are
a) 63 and 6, respectively
b) 64 and 5, respectively
c) 32 and 6, respectively
d) 31 and 5, respectively
Tree is the correct answer.
Ques 15Data Structure
What are the worst-case complexities of insertion and deletion of a key in a binary search tree?
a) Θ(logn) for both insertion and deletion
b) Θ(n) for both insertion and deletion
c) Θ(n) for insertion and Θ(logn) for deletion
d) Θ(logn) for insertion and Θ(n) for deletion
Binary Search Tree is the correct answer.
Ques 16Data Structure
Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s)?
I. 3, 5, 7, 8, 15, 19, 25
II. 5, 8, 9, 12, 10, 15, 25
III. 2, 7, 10, 8, 14, 16, 20
IV. 4, 6, 7, 9, 18, 20, 25
a) I and IV only
b) II and III only
c) II and IV only
d) II only
Tree Traversal is the correct answer.
Ques 17DBMS
A file is organized so that the ordering of data records is the same as or close to the ordering of data entries in some index. Then that index is called
a) Dense
b) Sparse
c) Clustered
d) Unclustered
Indexing is the correct answer.
Ques 18DBMS
Select operation in SQL is equivalent to
a) the selection operation in relational algebra
b) the selection operation in relational algebra, except that select in SQL retains duplicates
c) the projection operation in relational algebra
d) the projection operation in relational algebra, except that select in SQL retains duplicates
SQL is the correct answer.
Ques 19Digital Logic
Consider a 4 bit Johnson counter with an initial value of 0000. The counting sequence of this counter is
a) 0,1,3,7,15,14,12,8,0
b) 0,2,4,6,8,10,12,14,0
c) 0,8,12,14,15,7,3,1,0
d) 0,1,3,5,7,9,11,13,15,0
Number Representation is the correct answer.
Ques 20Digital Logic
Which one of the following is NOT equivalent to p ↔ q?
a) (┐p ˅ q) ˄ (p ˅ ┐q)
b) (┐p ˅ q) ˄ (q → p)
c) (┐p ˄ q) ˅ (p ˄ ┐q)
d) (┐p ˄ ┐q) ˅ (p ˄ q)
Proposition Logic is the correct answer.
Ques 21Discrete Mathematics
For a set A, the power set of A is denoted by 2A. If A = {5,{6},{7}}, which of the following options
are TRUE?
I. ∅ ∈ 2A
II. ∅ ⊆ 2A
III. {5,{6}} ∈ 2A
IV. {5,{6}} ⊆ 2A
a) I and III only
b) II and III only
c) I, II and III only
d) I, II and IV only
Set Theory is the correct answer.
Ques 22OS
Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is given: 45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the initial position of the R/W head is on track 50. The additional distance that will be traversed by the R/W head when the Shortest Seek Time First (SSTF) algorithm is used compared to the SCAN (Elevator) algorithm (assuming that SCAN algorithm moves towards 100 when it starts execution) is _________ tracks
a is the correct answer.
Ques 23OS
The following two functions P1 and P2 that share a variable B with an initial value of 2 execute concurrently.
{
C = B – 1;
B = 2*C;
}
P2()
{
D = 2 * B;
B = D - 1;
}
a is the correct answer.