Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

ME-

CS

ANALYSIS OF GATE 2019


Memory Based

Computer Science and Information technology

Engineering
Mathematics
General Aptitude
7%
15%
Operating System
10%
Compiler Design
Programming and
8%
Data Structures
9%

Computer Networks
6%
Design and Analysis
Data Base of Algorithm
Management System 7%
7%
Discrete Mathematics
Digital Logic and Graph Theory
8% 11%
Theory of Computer
Computation Organization and
6% Architecture
6%

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

1
ME-

CS

CS ANALYSIS-2019_Feb-3_Morning

Level of Total
SUBJECT No. of Ques. Topics Asked in Paper(Memory Based)
Ques. Marks
Engineering 1 Marks: 5
Linear Algebra, Probability , Calculus, Medium 7
Mathematics 2 Marks: 1
1 Marks: 2 CPU Scheduling, Synchronization,
Operating System 2 Marks: 4 Deadlock, Memory Management and File Medium 10
Systems
Programming 1 Marks: 3
and Data 2 Marks: 3 All programming Easy 9
Structures
Design and 1 Marks: 1
Subsequence sum, max heap, MST ,
Analysis of 2 Marks: 3 Easy 7
binary tree
Algorithm
Discrete 1 Marks: 3
Mathematics and 2 Marks: 4 Trees, Graph Theory Medium 11
Graph Theory
Computer 1 Marks: 2
Organization and 2 Marks: 2 Memory Organization Medium 6
Architecture
Theory of 1 Marks:2 Pumping lemma, Countability, Context free
Medium 6
Computation 2 Marks: 2 language
1 Marks: 4 K, Maps, Boolean Algebra, Combinational
Digital Logic Medium 8
2 Marks: 2 Circuits, Number system
Data Base 1 Marks: 3
SQL, B+Tree, Transactions and
Management 2 Marks: 2 Easy 7
Concurrency Control, Relational Algebra
System
Computer 1 Marks: 2
Protocols, Ethernet, Medium 6
Networks 2 Marks: 2
1 Marks: 2
Compiler Design Lexical Analysis Medium 8
2 Marks: 3
1 Marks: 5
General Aptitude Numbers, Data Interpretation, Grammar Medium 15
2 Marks:5
Total 65 100

Faculty Feedback Overall medium level difficulty paper.

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

2
ME-

CS

General Aptitude
GATE 2019 Examination* (Memory Based)

Computer Science and Information technology

Test Date: 3-FEB-2019


Test Time: 9.30 AM to 12:30 PM
Subject Name: Computer Science and Information technology

General Aptitude
Q.1 - Q.5 Carry One Mark e
1. The police has arrested four criminals P, Q, R and S.
P says Q committed crime
Q says S committed crime
R says “I didn’t do it”
S says what Q said about me is false.
There is only one criminal and also only one of the above statements is correct. Who among
the four committed the crime?
(A) P
(B) Q
(C) R
(D) S
[Ans. C]
P Q R S
T F T T
F T T F
F F T/F T
In such scenario, we assume one person tells true.
If P is telling true, Q will automatically be false and if Q is false then S is automatically true
according to scenario. And R is already telling true. But, here we are gaining 3 persons telling
truth which is not matching our criteria of only one statement being true.
Similarly if Q is telling true, means P is telling false. And if Q is true then S is automatically be
false. Here also, we are gaining more than one statement to be true.
So, we assume P is telling false, means Q is also telling false means S is automatically telling
true. So, we have two choices for R as true or false. So, R is telling false to match our criteria.
Since R is telling false that he has not done anything means he is the culprit.

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

3
ME-

CS

2. Two cars start at same place in same direction at same time and covers same distance. Car ‘A’
has speed 50 km/hr, car ‘B’ has speed 60 km/hr. After how many hours the distance between
them will be 20 kms?
[Ans. *]Range: 2 to2
Since both the cars ‘A’ and ‘B’ start at same time from same place.
So, speed of car ‘B’ with respect to car ‘A’ is 10 km/hr
20 km
So, time taken to be a gap of 20 kms between them = = 2 hours.
10 kmph
3. The court is for judge as _________is to teacher.
(A) Syllabus
(B) Punishment
(C) Student
(D) School
[Ans. D]
As court is work-place for judge, similarly school is work-place for teachers.

4. 10 students decide to buy gift for their teacher. After buying gift, 2 of the students do not pay
their share. Then share of the remaining students increases by 150 each. What is the cost of
the gift?
(A) 3000
(B) 6000
(C) 1200
(D) 666
[Ans. B]
As two students did not pay their share for the gift; share of remaining students increased by
Rs.150 each.
⇒ increased money to be paid = 150 ∗ 8 = 1200
This 1200 is nothing but the share of those two students who didn’t pay.
1200
⇒ share of each = = 600, and this is share of every students to be paid
2
∴ total cost = 600 ∗ 10 = 6000

5. There are 80 students are in drama club only, 40 students are in dance club only and 30
students are in math club only. 12 students are both in drama and math club, 7 students are in
dance and math club both, 20 students are in dance and drama club both and 2 students are in

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

4
ME-

CS

all the clubs. If 75% of the total college students are not part of any club , then the total
number of students in the college are __________
[Ans. *]Range: 740 to 740
Drama Dance
18 40
80
2
10 5

30

Math
Number of students who are part of the clubs= 80 + 40 + 30 + 18 + 5 + 10 + 2 = 185
Since, 75% of the students are not part of any club; means only 25% of the students (185) are
part of the club.
1
∗ total = 185
4
∴ Total students = 185 × 4 = 740

Q.6 - Q.10 Carry Two Mark each.


6. The search engine business model _________ around fulcrum of trust.
(A) Revolves
(B) Plays
(C) Burst
(D) Sinks
[Ans. A]

7. The expenditure of project _________


(Given: Equivalence: 20 lakhs, Salary: 12 lakhs, Contingency: 3 lakhs)
(A) Break
(B) Breakdown
(C) Breaks
(D) Breaks down
[Ans. D]

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

5
CS

8. Find the % of Administrators in the given Venn-diagram:


Scholars
10
70
20 Administrators

20
Researchers
40

(A) 0-15
(B) 16-30
(C) 47-60
(D) 31-46
[Ans. D]
Number of Administrators = 10+20+20=50
Total number of person= 80+20+20+40=160
50 5
So, % of Administrators = ( ) × 100 = × 100 = 31.25%
160 16

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

6
CS

Will update Soon

Technical
Q.1 - Q.25 Carry One Mark each.
1. Let Z = X − Y, X, Y, Z are signed magnitude numbers and X, Y are represented in n-bit numbers.
To avoid overflow minimum number of bits would require for Z is _________
(A) n-bit
(B) n + 2 bits
(C) n + 1 Bits
(D) (n − 1) bits
[Ans. C]

2. From a complete binary tree T of 8 leaf nodes, two leaf nodes a and b are selected randomly and
uniformly. What is the expected distance between a and b in T?
[Ans. *]Range 4.25 to 4.25
N is having 8 leaf nodes.
One leaf with 2 edge distance.
Two leaves with 4 edge distance
Four leaves with 6 edge distance.
Total 7 leaves are here so approximately if we take answer would be in the range of 4.25 to 4.85.
Expectation = (1*2 + 2*4 + 4*6)/N = 34/8 = 4.25 (up to decimal places exact as stated in
question)

3. What is the 2’s complement representation for −28 in 16 − bit register


(A) 1111 1111 1110 0100
(B) 0000 0000 0010 0100
(C) 1111 1111 1101 1000
(D) 1111 1111 1111 1100
[Ans. A]
1. Convert +28 into binary as :1100 in 16 bit 0000 0000 00011100
2. 1’s complement of +28 as :1111 1111 1110 0011
3. 2’s complement of +28 as :
Add 1 to step2
1111 1111 1110 0011
+1
1111 1111 1110 0100

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

7
CS

4. Which of the following are used to send and retrieve emails respectively?
(A) SMTP and IMAP
(B) SMTP and POP3
(C) IMAP and POP3
(D) POP3 and SMTP
[Ans. B]
SMTP & POP3 are the protocols which are responsible for the email communication, SMTP is
responsible for outgoing mail & POP3 is responsible for retrieving mail.

5. What is the remainder of 351 mod 5 ?


[Ans. *]Range 2 to 2

6. In RSA algorithm, the value of n is 3007 and the value of ∅(n) is 2880 where ∅ is the Euler’s
totient function. What is the value of the prime number which greater than 50?
[Ans. *]Range: 97 to 97
A/q to RSA Algorithm
n = p ∗ q & O(n) = (p − 1)(q − 1) (Where p & q are two prime numbers)
So, 97 & 31 are the two prime numbers (which is satisfying the condition) & 97 is greater than
50 so, 97 is the right answer.

7. The chip selects logic for a certain DRAM chip in memory design shown. Assume that memory
has 16 address of memory system (in hexadecimal) that can be enabled by chip select?
(A) CA00 to CAFF
(B) DA00 to DAFF
(C) C800 to CFFF
(D) C800 to C8FF
A15

CS

A11

[Ans. C]
The address lines are given by A15 to A0
A15 1
A14 1
A13 1
CS = 1
A12 1
A11 1
⇒ A15 = A14 = A11 = 1
⇒ A13 = A12 = 0
A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
1 1 0 0 1 x x x x x x x x x x x

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

8
CS

1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0
(x=0 starting
address)


1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1
(x=3 ending
address )

Range: C800 - CFFF

8. Which of the following is not a valid identity


(A) x ⊕ y = (xy + x ′ y ′ )′
(B) x ⊕ y = x + y if x. y = 0
(C) (x + y) ⊕ z = x ⊕ (y + z)
(D) (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z)
[Ans. C]
(A) L H S = x ⊕ y
R H S = (xy + x ′ y ′ )′ = (x ⊙ y ′ ) = x ⊕ y
L H S = R H S ⇒ true
(B) L H S = x ⊕ y; condition x. y = 0; R H S = x + y
x y LHS RHS
0 0 0 0
0 1 1 1 ⇒ True
1 0 1 1

(C) L H S = (x + y) ⊕ z
R H S = x ⊕ (y + z)
Xyz LHS RHS
011 0 1
L H S ≠ R H S ⇒ False

(D) L H S = (x ⊕ y) ⊕ z
R H S = x ⊕ (y ⊕ z)
Xyz LHS RHS
011 0 0
As associative ⇒ True

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

9
CS

9. First order predicate logic x [(∀z ∶ z|x ⇒ ((z = x) ∨ (z = 1))) ⇒ ∃w(w > x)⋀
(∀z ∶ z|w ⇒ ((w = z) ∨ (z = 1)))] ; a|b means a divides b where a, b are integers
For sets
s1 = {1, 2, 3, ⋯ 100}
s2 = set of all positione integers
s3 = set of all integers
Which one of the following satisfies?
(A) s2 and s3
(B) s1 and s2
(C) All of these
(D) s1 and s3

10. If 15 computers are to be connected using 8 port Ethernet switches, then the minimum numbers
of switches required are _____. Assume no separate uplink port is available
[Ans. *] Range: 3 to 3
PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8 PC9 PC10 PC12

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 P
8 port ethernet switch PC11 PC13

1 2 3 4 5 6 7 8
PC14 PC15

11. Which of the following equivalent relation?


R1 ∶ ∀a, b ∈ G, a R1 b if and only if ∃g ∈ G ∶ a = g −1 bg
R 2 ∀ a, b ∈ G, a R 2 b if and only if a = b−1
(A) Both R1 and R 2
(B) R 2
(C) R1
(D) None of these

12. Consider ‘3’ concurrent process p1 , p2 , p3 access shared variable ‘D’ that has been to 100
P1 P2 P3
. . .
. . .
D = D + 20 D = D − 50 D = D + 10
. .
. .

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

10
CS

With uniprocessor system, are running time shared system. If the minimum and maximum
values possible for ‘D’ is x and y respectively. After completion of ‘3’ processes, the value of
y − x =__________
[Ans. *]Range 70 to 70

13. Consider the two statements of database transaction schedules.


(I) Strict 2PL protocol generates conflict serializable schedule and is recoverable
(II) Time stamp ordering concurrency control protocol with Thomas write rule generates view
serializable Which is not conflict serializable
Which of the following is true?
(A) I only
(B) Both I and II
(C) Neither I nor II
(D) II only
[Ans. B]

14. What is the output of the following C program?


int jumble (x, y){
x=2*x+y
return x;
}
Main ( )
{
x=2, y=5;
y=jumble (y, x);
x=jumble (y, x);
printf (x);
}
[Ans. *]Range 26 to 266

15. Consider n unsorted arrays, n is odd. Each array is having n distinct elements A1 , A2 , … … An .
(There is no common element in 2 arrays) what is the worst case time complexity the median of
medians of A1 , … … An .
(A) 0(n logn )
(B) 0 (n2 logn)
(C) 0(n)
(D) 0(n2 )
[Ans. B]
A/q To Me for sorting we will require "n(logn)" time & we have "n" such arrays there so we will
require O(n2 (logn)) for the worst case.

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

11
CS

16. If the following code executed in Unix system?


for (i = 0 ; i < 10; i + +)
{
If (i% 2 == 0)
for k ( );
}
How many child processes will be created?

17. L is regular grammar over ∑ = {a, b}. find which one is not regular
(A) L. LR = {xy |x ∈ L; y ∈ LR , LR is reversable of L}
(B) Suffix (L) = {y ∈ ∑∗ | ∃x∑∗ xy ∈ L}
(C) Prefix (L) = (y ∈ ∑∗ | ∃x∑∗ yx ∈ L
(D) {WW R |W ∈ L, W R is reverse of W}
[Ans. D]

18. Which of the following is not correct about B + Tree, which is used for creating as index of
relational database table?
(A) Key values in each node are kept in sorted order
(B) Leaf node pointer points to next node
(C) B + tree is height balanced tree
(D) Non-leaf have pointers to data records
[Ans. D]

19. The given functional dependency: F = {QR → S, R → P, S → Q}


Holds as relational schemes given for X(PQRS). Now X is decomposed into Y and Z as Y(PR) and
Z(QRS), X is not in BCNF. Consider the statements
(I) Y and Z are in BCNF
(II) Decomposition of X into Y and Z is dependency preserving and lossless
Which of the following is correct/TRUE?
(A) I only
(B) Both I and II
(C) Nether I or II
(D) II only
[Ans. D]

20. What is the total number of different Hamiltonian cycles for the complete graph of n vertices?
[Ans. *]
(n − 1)!/2

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

12
CS

21. Find the absolute Eigen value of R?


1 2 4 8
1 3 9 27
R= [ ]
1 4 16 64
1 5 25 125
[Ans. *]Range 12 to 12
1 2 4 8
1 3 9 27
R= [ ]
1 4 16 64
1 5 25 125
R 4 ← R 4 − R 3 , R 3 ← R 3 − R 2 , R 2 ← R 2 − R1
1 2 4 8
0 1 5 19
[ ]
0 1 7 37
0 1 9 61
R4 ← R4 − R3, R3 ← R3 − R2
1 2 4 8
0 1 5 19
[ ]
0 0 2 18
0 0 2 24
R4 ← R4 − R3
1 2 4 8
0 1 5 19
[ ]
0 1 2 18
0 0 0 6
1 × 1 × 2 × 6 = 12

x4 −81
22. limx→3 ax2 −5x−3
[Ans. *]
34 − 81 81 − 81 0
2
= = → indeterminant
2 × 3 − 5 × 3 − 3 18 − 15 − 3 0
L′ Hospital
4x 3
lim
x→3 4x − 5
4 × 33 108
⇒ =
4×3−5 7

23. Which of the following are used to send and retrieve emails respectively?
(A) SMTP and IMAP
(B) SMTP and POP3
(C) IMAP and POP3
(D) POP3 and SMTP

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

13
CS

24. LR parsers are _____________


(A) Leftmost derivation
(B) Reverse of Leftmost
(C) Reverse of Rightmost
(D) Rightmost derivation
[Ans. B]

Will update soon

Q.26 - Q.55 Carry Two Mark each.

26. Given P(X, Y, Z), Q(X, Y, T) and R (Y,V)


P Q R
X Y Z X Y T Y V
x1 y1 z1 x2 y1 2 y1 v1
x1 y1 z2 x1 y2 5 y3 v2
x2 y2 z2 x2 y1 6 y2 v3
x2 y2 z4 x3 y3 1 y2 v2

(P×R) (Q×R)
πx (σ(P.Y=R.Y ⋀ R.V=V2) ) ) − πx (σ(Q.Y=R.Y ⋀Q.T>2) ) )
How many tuples are returned?
[Ans. *]Range 1 to 1

27. Given that Roll-No in student is primary key in table performance the Roll-No & subject –
code combinely from primary key. Consider the query given to identify the no.of rows
retrieved after execution?
Student
Roll_No Student Name
1 Amit
2 Priya
3 Vineet
4 Rohan
5 Smita
Performance
Roll_No Subject_code Marks
1 A 86
1 B 95
1 C 90

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

14
ME-

CS

2 A 89
2 C 92
3 C 80
SELECT s.student_name, sum(p.marks)
FROM student s, performance P
WHERE p.marks>84
GROUP BY s.student.name
[Ans. *]Range 2 to 2

28. The output ‘f’ of the following circuit is


f1 f1 = ∑m(0, 2, 5, 8, 14)
f2 f f2 = ∑m(2, 3, 6, 8, 14, 15)
f3 = ∑m(2, 7, 11, 14)
f3
(A) ∑ m(2, 14)
(B) ∑ m(2, 7, 8, 11, 14)
(C) ∑ m(0, 2, 3, 5, 6, 7, 8, 11, 14, 15)
(D) ∑ m(7, 8, 11)
[Ans. D]

29. Minimum number of 2-input NOR gates required to implement 4-variable function
expressed in sum of minterms as f = ∑m(0, 2, 5, 7, 8, 10, 13, 15). Assume that all the inputs
and their complements available.
[Ans. *]Range to 3 to 3

30. Which of the following statements are correct?


S1: The set of recursively languages are uncountable
S2: The set of languages over ∑ = {a, b} are uncountable
S3: The set of non-regular language are uncountable
S4: The set of all the syntactically correct C-programs are uncountable.
[Ans. S2 and S3]

31. Which of the following are not CFL?


(A) L = {Wan W R bn / W ∈ (a, b)∗ , n ≥ 0
(B) L = {W W R /W ∈ (a, b)∗ }
(C) L = {Wan bn W R /W ∈ (a, b)∗ , n ≥ 0}
(D) L = {an bi /i ∈ (n, 3n, 5n, 7n), n ≥ 0}
[Ans. A]

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

15
ME-

CS

32. Consider ‘4’ processes p1 , p2 , p3 , p4 their arrival time and CPU burst time is given in the
table. SRTF scheduling algorthim is used. What is the value of ‘Z’ of average waiting time of
processes is 1ms.
Process Id Arrival Time Burst Time
p1 0 3
p2 1 1
p3 3 3
p4 4 ‘Z’
[Ans. *]Range 2 to 2
33. Consider Unix based file system (I-node), with 12 Direct addresses, one single indirection,
and one double indirection pointers, disk block size is 4kB and disk block addresses are 32
bits. Maximum file size is possible in this system ________GB
[Ans. *]Range 4 to 4
4kB
No of entries in block = 4B
= 1k
File size = 12 × 4kB + 1kB × 4kB + 1k × 1k × 4kB
= 48kB + 4MB + 4GB
= 4.004048 GB

34. Consider the following C program


#include<stdio.h>
main( )
{
float sum=0.0, j=1.0, i=2.0;
while (i/j>0.0625)
{
j=j+j;
sum=sum+i/j;
printf (sum);
}
No. of times the variable sum will be printed__________
[Ans. *]Range 5 to 5

35. G is a connected, weighted and undirected graph:


Consider the following statements about G:
I) G has a unique MST, if no two edges of G have same weight.
II) G has unique MST, if for every cut of G, there is exactly 1 minimum edge weights
(A) Both I & II are correct
(B) Only I
(C) Only II
(D) Neither I nor II

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

16
ME-

CS

[Ans. A]
Both the statements 1 & 2 are correct.
1. If every edge of an undirected graph has a unique weight, it will have a unique MST.
2. If every cut of a graph is connected with a unique minimum weight edge, the graph will
have a unique MST.
(This question is directly asked from class notes which I have mentioned as VVIMP
Question at the time of classes.)

36. Given a sequence of 14 elements


A = [−5, −10, 6, 3, −1, −2, 13, 4, −9, −1, 4, 12, −3, 0] . The sum of a subset is defined as
𝑗
S[i, j] = ∑𝑘=𝑖 𝐴 [k] Determine max of s[I, j] where 0 ≤ i ≤ j ≤ 14.(Divide and conquer
approach may be used)__________
[Ans. *]Range 29 to 29

37. Consider the two statements of database transaction schedules.


(III) Strict 2PL protocol generates conflict serializable schedule and is recoverable
(IV) Time stamp ordering concurrency control protocol with Thomas write rule generates
view serializable Which is not conflict serializable
Which of the following is true?
(E) I only
(F) Both I and II
(G) Neither I nor II
(H) II only
[Ans. B]

38. What is the output?


main( ) {
a[ ]={ 2, 4, 6, 8, 10};
int I, sum=0, *b=a+4;
for(i=0; i<5; i++)
sum=sum+(*b-i)− ∗ b − i);
return 0;
}
[Ans. *]Range 10 to 10

39. Consider the following statements :


I) Smallest element in max heap is at leaf node
II) 2nd largest element in max heap is always child of root node
III) A max heap can be constructed from binary search tree in O(n) time

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

17
ME-

CS

IV) A binary search tree can be constructed from a max heap in O(n) time
Which of the above statements are true?
(A) I, III, IV
(B) I, II, IV
(C) I, II, III
(D) II, III, IV

40. An array of 25 distinct elements is sorted using Quicksort. Pivot is chosen randomly. What
is the probability of pivot element getting placed at worst possible location in the first
round of probability is ____________. (Round off to two decimal places).

41. What is the output for the given code?


#include<stdio.h>
int r( ) {
static int num=7;
return num − −;
}
Int main ( ) {
for(r( ); r( ); r( )){
printf(“%d”, r ( ));
}
return 0;
}
(A) 52
(B) 41
(C)
(D)
[Ans. *] Range 52 to 52

42. void convert (int n){


if (n<0)
printf(“%d”,n);
else
convert(n/2);
printf(“%d”, n%2);
}
Which of the following is TRUE?

43. A certain processor deploy a single level-cache, the cache block size is 8 words, word size
is 4 bytes, memory system uses 60mHz clock, to service a cache miss, the memory
controller first takes 1 clock cycle to accept starting address of the block, it then takes 3

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

18
ME-

CS

cycles to fetch all the 8 words in the block & finally transmits the words of the requested
block at the rate of 1 word per cycle. The maximum bandwidth for the memory system
when the program on the processor issues a series of read operation is
_____________(106 Bytes/sec)
[Ans. *]Range 235.29 to 235.29

44. A network with three hosts M, N and P have IP address 194.X.10.2, 194.X.10.5 and
194.X.10.6 and their subnet mask is 255.255.255.252. Which of the following will be in a
same subnet?
(A) All three will be in same subnet
(B) M and N
(C) N and P
(D) All will be in different subnet
[Ans. C]

45. Consider the cache memory size of 16kb, and cache block size is 16 bytes. The processor
generates the physical address of 32 bits. Assume the cache is fully associative. What are
the TAG and index bits __________
(A) 28 and 4bits
(B) 28 and 0bits
(C) 24 and 4bits
(D) 24 and 0bits
[Ans. A]
Cache size=16kB, Block size=16B
PA=32 bits, fully Associative cache
PA = 32 bit
TAG WO

28 bit 4 bit
TAG = 28 bits
Index = (PA − TAG)bits
= 4 bits

1
46. ⃗ = 3 (−y 3 î + x 3 ĵ + z 3 k̂) & n̂ as the unit normal vector to surface of semi
Given vector u
sphere (x 2 + y 2 + z 2 = 1, z ≥ 0)

47. What is the output of the following C program?


#include<stdio.h>
int main {
int arc[ ]={1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 12, 5}, *ip=arr+4;

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

19
ME-

CS

printf (“%d”, ip[1]);


return 0;
}
[Ans. *]Range 6 to 6

48. Given Grammar


S’ → S
S → <L>/id
L → L, S/S
Let I0 = closure ({[S’ → • S]})
How many items are in goto (I0 , <) __________
[Ans. *]Range 5 to 5

49. Consider the following grammar:


S → Aa
A → DB
D→b∉
B→d∉
Non-terminals are {S, A, D, B} and terminals are {a, b, d, $}. Terminals indexes are
represented:
a b d $
3 2 1 0
Follow set in evaluated for non-terminals. Follow set of {a, b, d, $} prints their indexes as 3
2 1 0 (in decoding order)
What is the descending order of indexes of the follow set of ‘D’ ________
[Ans. *]Range 31 to 31

50. Consider the language: L = {a2+3k or b10+12k } for k ≥ 0. Which of the following is correct
for the length of string L to satisfy Pumping Lemma?
(A) 5
(B) 24
(C) 9
(D) 3

51. Consider the following processes using preemptive shortest remaining time first.
P1 P2 P3 P4
Arrival time 0 1 3 4
CPU time 3 1 3 Z
If the average waiting time is 1 ms then what is the value of Z?
[Ans. *]Range 3 to 3

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

20
ME-

CS

Will update soon

Don’t Wait! Know Your GATE Rank with GATE Rank Predictor. Predict Now, http://bit.ly/grp2019
: 080-4061 1000,  info@thegateacademy.com ©Copyright reserved. Web:www.thegateacademy.com

21

You might also like