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 3 Questions
Ques 1Aptitude
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, Defence, 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 of telecom, then she must get the other one.
T insists on a portfolio if P gets one.
Which is the valid distribution of portfolios?
a) P-Home, Q-Power, R-Defence, S-Telecom, T-Finance
b) R-Home, S-Power, P-Defence, Q-Telecom, T-Finance
c) P-Home, Q-Power, T-Defence, S-Telecom, U-Finance
d) Q-Home, U-Power, T-Defence, R-Telecom, P-Finance
English Grammar is the correct answer.
Ques 2Aptitude
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?
a) Alexander would not have turned his attention towards India had he not conquered Persia.
b) Alexander was not ready to rest on his laurels, and wanted to march to India.
c) Alexander was not completely in control of his army and could command it to move towards India.
d) Since Alexander's kingdom extended to Indian borders after the conquest of Persia, he was keen to move further.
English Grammar is the correct answer.
Ques 3Aptitude
Select the pair that best expresses a relationship similar to that expressed in the pair:
Children : Pediatrician
a) Adult : Orthopaedist
b) Females : Gynaecologist
c) Kidney : Nephrologist
d) Skin : Dermatologist
English Grammar is the correct answer.
Ques 4Aptitude
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.
a) related
b) extraneous
c) outside
d) useful
English Grammar is the correct answer.
Ques 5Aptitude
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.
a) Mr., was, found, on
b) a, was, found, at
c) the, was, found, on
d) a, being, find at
English Grammar is the correct answer.
Ques 6Aptitude
If ROAD is written as URDG, then SWAN should be written as
a) VXDQ
b) VZDQ
c) VZDP
d) UXDQ
English Grammar is the correct answer.
Ques 7Aptitude
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 statements(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.
a) (iii) and (iv)
b) (ii) and (iii)
c) (ii) only
d) (i), (ii) and (iii)
1 is the correct answer.
Ques 8C
Consider the following C program.
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 _________
a is the correct answer.
Ques 9C
Consider the following two C code segments. Y and X are one and two dimensional arrays of size n and n × 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 same main memory page frame.
Code segment 1:
// initialize elements of Y to 0
// initialize elements 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 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.
a) Only S2 is correct
b) Only S3 is correct
c) Only S1 and S2 are correct
d) Only S1 and S3 are correct
C Code is the correct answer.
Ques 10C
Consider the following C program segment.
int main( )
{
char s1[7] = "1234", *p;
p = s1 + 2;
*p = '0' ;
printf ("%s", s1);
}
What will be printed by the program?
a) 12
b) 120400
c) 1204
d) 1034
C Code is the correct answer.
Ques 11COA
Consider a machine with a byte addressable main memory of 220 bytes, block size of 16 bytes and a direct mapped cache having 212 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?
a) E, 201
b) F, 201
c) E, E20
d) 2, 01F
Cache Memory is the correct answer.
Ques 12Compiler
Consider the following grammar G.
S → F ⎪ H
F → p ⎪ c
H → d ⎪ c
Where S, F and H are non-terminal symbols, p, d and c are terminal symbols. Which of the following statement(s) is/are correct?
S1: LL(1) can parse all strings that are generated using grammar G.
S2: LR(1) can parse all strings that are generated using grammar G.
a) Only S1
b) Only S2
c) Both S1 and S2
d) Neither S1 and S2
Parser is the correct answer.
Ques 13Compiler
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?
a) SLR, LALR
b) Canonical LR, LALR
c) SLR, canonical LR
d) LALR, canonical LR
Parser is the correct answer.
Ques 14Computer Network
Consider a network connecting two systems located 8000 kilometers apart. The bandwidth of the network is 500 × 106 bits per second. The propagation speed of the media is 4 × 106 meters per second. It is needed to design a Go-Back-N sliding window protocol for this network. The average packet size is 107 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 he sequence number field has to be ________.
a is the correct answer.
Ques 15Computer Network
Consider the following statements.
I. TCP connections are full duplex.
II. TCP has no option for selective acknowledgment
III. TCP connections are message streams.
a) Only I is correct
b) Only I and II are correct
c) Only II and III are correct
d) All of I, II and III are correct
TCP/IP is the correct answer.
Ques 16Computer Network
Consider a CSMA/CD network that transmits data at a rate of 100 Mbps (108 bits per second) over a 1 km (kilometre) 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?
a) 8000
b) 10000
c) 16000
d) 20000
OSI Model is the correct answer.
Ques 17Data Structure
Given a hash table T with 25 slots that stores 2000 elements, the load factor α for T is __________
a is the correct answer.
Ques 18Data Structure
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?
a) 256
b) 512
c) 1024
d) 2048
Sorting Algorithm is the correct answer.
Ques 19Data Structure
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
a) 4
b) 5
c) 3
d) 2
Array is the correct answer.
Ques 20Data Structure
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
a) 65
b) 67
c) 69
d) 83
Binary Search Tree is the correct answer.
Ques 21Data Structure
The result evaluating the postfix expression 10 5 + 60 6 / * 8 – is
a) 284
b) 213
c) 142
d) 71
Stack is the correct answer.
Ques 22DBMS
Consider the relation X(P, Q, R, S, T, U) with the following set of functional dependencies
F = {
{P, R} → {S,T},
{P, S, U} → {Q, R}
}
Which of the following is the trivial functional dependency in F+ is closure of F?
a) {P,R}→{S,T}
b) {P,R}→{R,T}
c) {P,S}→{S}
d) {P,S,U}→{Q}
Functional Dependency is the correct answer.
Ques 23DBMS
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?
a) WHERE P1. Capacity> = All (select P2. Capacity from Cinema P2)
b) WHERE P1. Capacity> = Any (select P2. Capacity from Cinema P2)
c) WHERE P1. Capacity > All (select max(P2. Capacity) from Cinema P2)
d) WHERE P1. Capacity > Any (select max (P2. Capacity) from Cinema P2)
SQL Query is the correct answer.
Ques 24Discrete Mathematics
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 ____.
a is the correct answer.
Ques 25Discrete Mathematics
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?
a) The result is head
b) The result is tail
c) If the person is of Type 2, then the result is tail
d) If the person is of Type 1, then the result is tail
Propositional Logic is the correct answer.
Ques 26Discrete Mathematics
Suppose U is the power set of the set S = {1,2,3,4,5,6}. For any T ∈ U, let |T| denote the number of elements in T and T′ denote the complement of T. For any T, R ∈ U, let TR be the set of all elements in T which are not in R. Which one of the following is true?
a) ∀X∈U(|X| = |XX′|)
b) ∃X∈ U∃Y∈U(|X|=5,|Y|=5 and X∩Y= ∅)
c) ∀X∈U∀Y∈U(|X|=2,|Y|=3 and X∖Y=∅)
d) ∀X∈U∀Y∈U(X∖Y=Y′∖X′ )
Set Theory is the correct answer.
Ques 27Discrete Mathematics
Let # be a binary operator defined as X # Y = X′ + Y′ where X and Y are Boolean variables. Consider the following two statements.
S1: (P # Q) # R = P # (Q # R)
S2: Q # R = R # Q
Which of the following is/are true for the Boolean variables P, Q and R?
a) Only S1 is True
b) Only S2 is True
c) Both S1 and S2 are True
d) Neither S1 nor S2 are True
Propositional Logic is the correct answer.
Ques 28Mathematics
A function f(x) is linear and has a value of 29 at x = –2 and 39 at x = 3. Find its value at x = 5.
a) 59
b) 45
c) 43
d) 35
Aptitude is the correct answer.
Ques 29OS
The maximum number of processes that can be in Ready state for a computer system with n CPUs is
a) n
b) n2
c) 2n
d) Independent of n
Process is the correct answer.
Ques 30Software Engineering
Consider a software project with the following information domain characteristic for calculation of function point metric.
Number of external inputs (I) = 30
Number of external output (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 he other four factors have value 3, and each of the remaining factors have value 4. The computed value of function point metric is ____________
a is the correct answer.
Ques 31Software Engineering
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 ____________.
a is the correct answer.
Ques 32Web Designing
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?
a) <a.href: “http://www.yourname.com/”, href: “...var.html”>
b) <base href: “http://www.yourname.com/”>
c) <a.href: “http://www.yourname.com/”>
d) <base href: “http://www.yourname.com/”, range: “...var.html”>
Web Designing is the correct answer.