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

5/15/2021 GATE CS Applied Course

 +91 844-844-0102 gatecse@appliedroots.com Importance of the GATE exam PRACTICE TESTS My Account Logout

OVERALL ANALYSIS Solution Report

All Correct Answers Wrong Answers Not Attempted Questions

Q.1) Subject: digital logic systems Max Marks: 1 


A 24-bit ripple carry adder is constructed using 24 identical full adders. The carry propagation delay of
each full adder is 12 units of time while the sum propagation delay of each full adder is 15 units of time. The worst case delay of the 24-bit ripple carry adder
will be ______

Correct Answer

Solution: (291)

Q.2) Subject: Engineering-Mathematics Max Marks: 1 


The number of ways in which 12 identical coins can go into 5 purses such that no purse is empty is

A C(11,5)

B C(12,5)

C C(11,4) Correct Option |  Attempted

Solution: (C)

D C(12,4)

Time taken to answer this question 00:06:14 hrs

Q.3) Subject: Data Structures Max Marks: 1 


Evaluate the following postfix expression___
43*739*+-

Correct Answer

Solution: (-22)

Postfix expression evaluation can be done using a stack


Push 4,3
Pop 4, 3, perform 4*3 and push back 12.
Push 7,3,9
Pop 9, 3 and perform 9*3 and push back 27
Pop 27 and 7 perform 2+7 and push back 34
Pop 34 and 12 and perform 12-34=-22
End of expression is reached result is -22.

Your Answer is wrong (22)

https://gate.appliedroots.com/report?id=185806 1/35
5/15/2021 GATE CS Applied Course

Time taken to answer this question 00:00:47 hrs

Q.4) Subject: Computer Networks Max Marks: 1 


In the Stop and wait protocol, the link utilization is 40%, if the bandwidth 100 KB/sec. If we are using a
frame size of 1 KB, what is the propagation time in milli sec with the basic stop-and-wait protocol?

Correct Answer

Solution: (7.5)
Tt = 1 KB/ 100 KB/sec = .01 sec
0.4 = 1 / 1+ 2a
1+2a= 1 /0.4
1 + 2 Tp/Tt = 1 / 0.4
Tp = 0.0075 sec = 7.5 m sec

Your Answer is wrong (7.68)

Time taken to answer this question 00:07:40 hrs

Q.5) Subject: Theory of Computation Max Marks: 1 

B Correct Option |  Attempted

Solution: (B)

Time taken to answer this question 00:03:27 hrs

Q.6) Subject: Theory of Computation Max Marks: 1 


Consider the following deterministic finite automata

The language accepted by the given deterministic finite automata is

Set of all the strings of a’s and b’s in which every string ends with b
https://gate.appliedroots.com/report?id=185806 2/35
5/15/2021 GATE CS Applied Course

B Set of all the strings of a’s and b’s in which every string contains a substring ab.

C Set of all the strings of a’s and b’s in which every string starts with a or b and ends with b. Your answer is Wrong

D None of these Correct Option

Solution: (D)
Set of all the strings of a’s and b’s in which every string ends with b False

The string like ‘b’ also ends with ‘b’ but is not accepted by the DFA.

Set of all the strings of a’s and b’s in which every string contains a substring ab. Fa;se

Strings like ‘bb’ are also accepted by the DFA but do not contain ab as a substring.

Set of all the strings of a’s and b’s in which every string starts with a or b and ends with b. False

The strings like ‘abb’ also start with ‘a’ and end with ‘b’ but are not accepted by the DFA.

The language accepted by the DFA is set of all the strings that starts with ‘a’ or ‘b’ followed by zero or more occurrences of ‘a’ and ends with ‘b’.

Time taken to answer this question 00:03:41 hrs

Q.7) Subject: Engineering-Mathematics Max Marks: 1 

Correct Answer |  Attempted

Solution: (-3969)

Time taken to answer this question 00:05:19 hrs

Q.8) Subject: computer organization Max Marks: 1 


A CPU has a 20 bit program counter. This means that the CPU can address

A 32K memory locations

B 64K memory locations

C 256K memory locations

D 1024K memory locations Correct Option

https://gate.appliedroots.com/report?id=185806 3/35
5/15/2021 GATE CS Applied Course

Solution: (D)

Q.9) Subject: Algorithms Max Marks: 1 


f(n)=O(g(n))
h(n)=O(i(n))
g(n)=O(i(n))
Then f(n)+h(n)=__

A O(f(n))

B O(g(n))

C O(i(n)) Correct Option |  Attempted

Solution: (C)
f(n)+h(n)=O(g(n)+O(i(n)), among g(n) and i(n) we know that i(n) is growing faster as g(n)=O(i(n)) hence f(n)+h(n)=O(i(n)).

D None of the above.

Time taken to answer this question 00:02:38 hrs

Q.10) Subject: Engineering-Mathematics Max Marks: 1 

D Correct Option |  Attempted

Solution: (D)

Time taken to answer this question 00:03:30 hrs

Q.11) Subject: C Programming Max Marks: 1 


Which of the following option is true for the given declaration

A foo is the function pointer which takes the double pointer and returns the pointer to the integer.

B A function foo is taking the pointer to integer as an argument and returning the integer pointer.

C A function foo is taking the pointer to pointer to an integer as an argument and returning the pointer to Correct Option |  Attempted
pointer to an integer.

https://gate.appliedroots.com/report?id=185806 4/35
5/15/2021 GATE CS Applied Course

Solution: (C)
Function foo here is taking the double pointer as the argument, foo is not the function pointer.

A function foo is taking the pointer to pointer to an integer as an argument and returning the pointer to pointer to
an integer.

D None of the above

Time taken to answer this question 00:00:49 hrs

Q.12) Subject: Theory of Computation Max Marks: 1 


Consider the following grammar fragment

The nonterminals are URL, PROTO, HOST, I, FILE and G. Then the entries in the LL(1) parse table for [URL,http] and [URL, p] respectively is

A No entries in the table

B Your answer is Wrong

C Correct Option

Solution: (C)

Time taken to answer this question 00:00:25 hrs

Q.13) Subject: Algorithms Max Marks: 1 


Considering a network of n cities(each connected to remaining all_ and the distance from one to other is, each of
which is present in the adjacency matrix, the time required to find the shortest distance from one of the cities to the remaining all the cities is.

A Your answer is Wrong

B O(nlogn)

C Correct Option

Solution: (C)
The time complexity of Dijkstra's single-source shortest path algorithm when we have an adjacency matrix in the input O(n^2(log(n)).

D None of the above

Time taken to answer this question 00:03:14 hrs

Q.14) Subject: Computer Networks Max Marks: 1 


A company wants to create the 6 subnets with network address 192.123.220.0/23. Each subnet must have
a maximum number of hosts possible. What is the address of the fourth host of the third subnet.
https://gate.appliedroots.com/report?id=185806 5/35
5/15/2021 GATE CS Applied Course

A 192.123.220.68

B 192.123.220.132 Correct Option

Solution: (B)

For six subnets = 3 bits required


Third subnet = 010
192.123.220.10 000100 = 192.223.220.132

C 192.123.221.132 Your answer is Wrong

D None of these

Time taken to answer this question 00:06:36 hrs

Q.15) Subject: computer organization Max Marks: 1 


Match the following

A 1-A, 2-D, 3-C, 4-B

B 1-C, 2-B, 3-D, 4-A

C 1-C, 2-B, 3-A, 4-D Correct Option |  Attempted

Solution: (C)
Immediate: Operand value is present in the instruction itself (address field)
Direct: The address field contains the address (in main memory) where the operand is stored.
Indirect: The address field refers to the address of a word in the memory, which in-turn contains the address of the operand.
Register Direct: The address field of the operand is a register

D 1-A, 2-D, 3-B, 4-C

Time taken to answer this question 00:00:40 hrs

Q.16) Subject: digital logic systems Max Marks: 1 

D Correct Option |  Attempted

https://gate.appliedroots.com/report?id=185806 6/35
5/15/2021 GATE CS Applied Course

Solution: (D)

Time taken to answer this question 00:02:37 hrs

Q.17) Subject: Discrete Mathematics Max Marks: 1 

A S1 is True, S2 is False Correct Option

Solution: (A)

B S1 is False, S2 is True

C Both S1 and S2 are False

D None of the above

https://gate.appliedroots.com/report?id=185806 7/35
5/15/2021 GATE CS Applied Course

Q.18) Subject: Computer Networks Max Marks: 1 

A 1-(vi), 2 - (iv), 3- (ii), 4- (v), 5- (iii) Correct Option |  Attempted

Solution: (A)
SMTP =25
HTTP =80
DNS =53
POP client = 110
FTP = 21

B 1-(iii), 2 - (iv), 3- (i), 4- (v), 5- (vi)

C 1-(iii), 2 - (v), 3- (ii), 4- (iv), 5- (vi)

D 1-(vi), 2 - (iv), 3- (i), 4- (v), 5- (iii)

Time taken to answer this question 00:01:38 hrs

Q.19) Subject: computer organization Max Marks: 2 


A 16KB cache has a block size of 16 bytes and has an associative of 16. The system is using a 20 bit
physical address. Which set(decimal) of this cache will be indexed to know if the availability of the physical address 0xA2104(Hexadecimal) is a hit or not?

Correct Answer

Solution: (16)

Your Answer is wrong (2)

Time taken to answer this question 00:00:47 hrs

Q.20) Subject: computer organization Max Marks: 2 


If a direct mapped cache has a miss rate of 5%, a hit time of 4 ns, and If an L2 cache is added with a hit
time of 20 ns and a miss rate of 50%,the miss penalty for L2 cache is 150ns what is the new AMAT?

A 7.5ns

https://gate.appliedroots.com/report?id=185806 8/35
5/15/2021 GATE CS Applied Course

B 8 ns

C 8.5ns

D 8.75ns Correct Option

Solution: (D)

AMAT = Hit Time + Miss Rate* Miss Penalty


AMAT = 4 + 0.05 (20 + 0.5 *150) =4 + 0.05 (20+75) = 4+4.75 = 8.75ns

Q.21) Subject: DBMS Max Marks: 2 

A Only I

B Only II

C Both I and II Correct Option

Solution: (C)

Both R and S are set operations compatible and here we are performing set di erence in RA query. In the given SQL query it is mentioned
distinct so that it works like a projection operator only. In the inner query we are performing the set di erence operation using EXCEPT operator
and storing it in resultant relation Z. Therefore, this statement is true.
This statement is also correct because both the queries are retrieving the attributes A, and C a er joining the relations R and S.

Hence, both the statements are correct.

D Neither I nor II

Q.22) Subject: Theory of Computation Max Marks: 2 

A I and II only

B II and III only Your answer is Wrong

C I and III only Correct Option

https://gate.appliedroots.com/report?id=185806 9/35
5/15/2021 GATE CS Applied Course

Solution: (C)

D I, II and III

Time taken to answer this question 00:03:28 hrs

Q.23) Subject: digital logic systems Max Marks: 2 


Consider the below given excitation table of an AB flip flop:

Which of the following is the correct characteristic equation of the given flip flop?

A A . Q(n)’ + B’ . Q(n)

B A + B’ . Q(n) Correct Option

Solution: (B)
Based on the given excitation table, the truth table of the given flip flop will be:

https://gate.appliedroots.com/report?id=185806 10/35
5/15/2021 GATE CS Applied Course

The K-map for Q(n+1) will be:

The minimal expression obtained from above k-map for Q(n+1) is: A + B’ . Q(n)
Therefore, the correct option is (ii).

C A . Q(n) + B’ . Q(n)’

D A + B’ . Q(n)’

Q.24) Subject: Theory of Computation Max Marks: 2 

C Correct Option |  Attempted

Solution: (C)

https://gate.appliedroots.com/report?id=185806 11/35
5/15/2021 GATE CS Applied Course

Time taken to answer this question 00:00:57 hrs

Q.25) Subject: Algorithms Max Marks: 2 


If the length of the longest common subsequence among the following strings as ‘a’ and the number of such
longest common subsequences is ‘b’ then the value of a+b is ____
“prqprqp”
“pqrpqpq”

Correct Answer

Solution: (9)

If we apply the DP algorithm we get the possible longest common subsequences are
pqpqp
pqrqp
prpqp
prqpq

Each is of length 5, a+b=5+4=9.

Your Answer is wrong (8)

Time taken to answer this question 00:03:31 hrs

Q.26) Subject: DBMS Max Marks: 2 

C Correct Option

https://gate.appliedroots.com/report?id=185806 12/35
5/15/2021 GATE CS Applied Course

Solution: (C)

Q.27) Subject: operating systems Max Marks: 2 


Assume a file system with the following layout and sizes:
blocks: 512 bytes,
inodes: 64 bytes,
directory entries: 16 bytes,
inode numbers: 2bytes, and
block numbers: 4 bytes
The file system has 12 direct pointers, 1 indirect pointer in the i-node.

Assume only a single directory (the root).


What is the maximum size a file can be?

A 68740 bytes

B 71680 bytes Correct Option

Solution: (B)
There are 12 block references in an inode, and one single-indirect block that refers to another 512/4 = 128 blocks. So there are a total of 140 blocks.
With 512 bytes per block, the maximum file size is = 140 ×512 = 71680 bytes.

C 74770 bytes

D None of the above

https://gate.appliedroots.com/report?id=185806 13/35
5/15/2021 GATE CS Applied Course

Q.28) Subject: Theory of Computation Max Marks: 2 

A I only Correct Option

Solution: (A)

B II only

C II and III only Your answer is Wrong

D None of them are regular

Time taken to answer this question 00:02:31 hrs

Q.29) Subject: Data Structures Max Marks: 2 


The number of binary search trees possible with 7 distinct elements is___

Correct Answer |  Attempted

Solution: (429)

Time taken to answer this question 00:05:50 hrs

https://gate.appliedroots.com/report?id=185806 14/35
5/15/2021 GATE CS Applied Course

Q.30) Subject: Discrete Mathematics Max Marks: 2 

Which of the following options are correct?

A S1 is correct translation from english sentence, S2 is not

B S2 is a correct translation from english sentence, S1 is not

C Both S1 and S2 are incorrect translations from english sentence

D None of the above Correct Option

Solution: (D)

Q.31) Subject: Engineering-Mathematics Max Marks: 2 


Given that a box contains 2 unbiased coins and 1 biased coin with two sides as heads if a coin is
randomly picked from the box and tossed the probability that we get a heads is___.

A 1/2

B 1/3

C 2/3 Correct Option |  Attempted

https://gate.appliedroots.com/report?id=185806 15/35
5/15/2021 GATE CS Applied Course

Solution: (C)

D 1

Time taken to answer this question 00:02:27 hrs

Q.32) Subject: Computer Networks Max Marks: 2 


Consider a selective repeat sliding window protocol, the window size of the sender is 128. What will be the
sequence number for the 800th frame? [ Assume the available sequence number are the minimum required for window size of 128]

Correct Answer

Solution: (31)

Window size of selective repeat 2^(m-1) = 128


Min m = 8 bits
No of available seq number = 2^8 = 256
First 256 frames = 0 to 255
For next 256 frames = 0 to 255
For next 256 frames = 0 to 255
For last 32 frames = 0 to 31

The 800th frame 31 is the sequence number

Your Answer is wrong (117)

Time taken to answer this question 00:00:40 hrs

Q.33) Subject: DBMS Max Marks: 2 


On considering the Timestamp Ordering Protocol, which of the following must be correct?

B Correct Option

Solution: (B)

https://gate.appliedroots.com/report?id=185806 16/35
5/15/2021 GATE CS Applied Course

Q.34) Subject: Algorithms Max Marks: 2 

C Correct Option |  Attempted

Solution: (C)

Time taken to answer this question 00:05:19 hrs

Q.35) Subject: Theory of Computation Max Marks: 2 

A No conflicts

B LR(1) contains conflict but no conflicts in LALR(1)

C No conflicts in CLR(1) but conflicts in LALR(1) Correct Option |  Attempted

Solution: (C)

CLR(1) parser contains no conflicts


States I5 and I9 are the same with di erent lookaheads.

https://gate.appliedroots.com/report?id=185806 17/35
5/15/2021 GATE CS Applied Course

If we combine them, a new state will be created.

D Both LR(1) and LALR(1) contain conflicts.

Time taken to answer this question 00:02:53 hrs

Q.36) Subject: operating systems Max Marks: 2 

A Livelock

B No problem will result in most cases

C Deadlock Correct Option

Solution: (C)

The first process acquires the non_mutex and executes the CS. On completion of CS, it tries to acquire the non_mutex again and gets blocked.
And the second process tries to acquire non_mutex, it also gets blocked.
Since both the processes are in their blocked state, it is a deadlock.

D Mutual exclusion violation

Q.37) Subject: operating systems Max Marks: 2 


Consider the following page reference string:
7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6, 2, 3, 0, 1.
Assuming demand paging with three frames allocated to a process with a local allocation scheme used.
For this reference string, the number page faults in Belady’s optimal page replacement policy is ____

Correct Answer

Solution: (13)

Your Answer is wrong (14)

Time taken to answer this question 00:06:14 hrs

https://gate.appliedroots.com/report?id=185806 18/35
5/15/2021 GATE CS Applied Course

Q.38) Subject: C Programming Max Marks: 2 


What is the output printed by this program ?

A 56 8 11

B 55 7 10 Correct Option

Solution: (B)
Variable e is representing how many times the outer loop will run.
which is 1 , 2 , 4 , 8 ,16, 32, 64 , 128, 256 = 9 times

So e++ will run 9 times


then, e = e +9 = 10

Variable d is representing how many time inner loop will be executed.


Which is 1 , 3 , 9, 27, 81, 243= 6 times

So d= d + 6 = 7

Therefore, inner loop = 9 *6 = 54

c= c + 54 = 55

C 72 8 9

D None of the above

Q.39) Subject: computer organization Max Marks: 2 


There are 60 registers, and total 45 instructions available in a general purpose computer. The computer
allows only 2-address instructions, where one operand can be a register and another can be a memory location. The memory is byte addressable with 32KB
(Kilo bytes) in size. The minimum number of bits to encode the instruction will be _______

Correct Answer

https://gate.appliedroots.com/report?id=185806 19/35
5/15/2021 GATE CS Applied Course

Solution: (27)

Q.40) Subject: C Programming Max Marks: 2 


What is the output of the following C code ?

A 55555

B 54321 Correct Option

Solution: (B)

foo(0)=> inp=1 , foo(1), print(inp)


foo(1) = >inp =2, foo(2), print(inp)
foo(2)=> inp=3 , foo(3), print(inp)
foo(3)=> inp=4 , foo(4), print(inp)
foo(4)=> inp=5 , foo(5), print(inp)
foo(5)= return

It will print 5 4 3 2 1

C 12345

D None of the above.

Q.1) Subject: General Aptitude Max Marks: 1 


From the choices given below, select the pair of words which exhibits the same relationship between each
other as the given capitalized pair of words
TALLY : VOTES ::

A census : population Correct Option |  Attempted

Solution: (A)

Tally is to calculate the number of something, say votes in this case. Similarly census is the process of counting something, say population.
https://gate.appliedroots.com/report?id=185806 20/35
5/15/2021 GATE CS Applied Course

Thus , required answer will be TALLY : VOTES :: CENSUS : POPULATION.

B taxation : revenue

C government : laws

D team : athletes

Time taken to answer this question 00:01:49 hrs

Q.2) Subject: General Aptitude Max Marks: 1 

A 1/3

B 2/5

C 2/3

D 3/4 Correct Option |  Attempted

Solution: (D)

Time taken to answer this question 00:00:04 hrs

Q.3) Subject: General Aptitude Max Marks: 1 


There are 25 points on a plane of which 7 are collinear. How many triangles can be formed from these points?

A 453

B 2265 Correct Option |  Attempted

Solution: (B)

C 755

D None of the above.

Time taken to answer this question 00:02:49 hrs

Q.4) Subject: General Aptitude Max Marks: 1 


The following pie chart shows the number of subscriptions generated for Indian Bonds from di erent
categories of investors.

https://gate.appliedroots.com/report?id=185806 21/35
5/15/2021 GATE CS Applied Course

In the corporate sector, approximately how many degrees should be there in the central angle?

A 120

B 121

C 122 Correct Option |  Attempted

Solution: (C)

D 123

Time taken to answer this question 00:02:02 hrs

Q.5) Subject: General Aptitude Max Marks: 1 


This ________ old stone farmhouse has been a landmark since before the Independence.

A fragile

B sturdy Correct Option

Solution: (B)
The meaning of the word sturdy is “strongly and solidly built.” Here it is used as an adjective to describe the old stone farmhouse. Hence the correct
option is b.

C flimsy

D ramshackle Your answer is Wrong

Time taken to answer this question 00:00:53 hrs

Q.6) Subject: General Aptitude Max Marks: 2 


The main statement is followed by four statements labeled A, B, C and D. Choose the ordered pair of
statements, where the first statement implies the second and the two statements are logically consistent with the main statement.
Either Rohit is angry, or he shows mock anger.
I. Rohit shows mock anger.
II. Rohit is angry.
III. Rohit does not show mock anger.
IV. Rohit is not angry.

A Only III, II.

B Only IV, I. Your answer is Wrong

https://gate.appliedroots.com/report?id=185806 22/35
5/15/2021 GATE CS Applied Course

C II, I.

D III, II and IV, I. Correct Option

Solution: (D)

Rohit does not show mock anger signifies that Rohit is angry as per the statement. (III, II)
Rohit is not angry signifies that Rohit shows mock anger as per the statement. (IV, I)
Hence the correct option is (d).

Time taken to answer this question 00:01:39 hrs

Q.7) Subject: General Aptitude Max Marks: 2 


In the following figure, a square transparent sheet with a pattern is given. Figure out from amongst the four
alternatives as to how the figure would appear when the transparent sheet is folded at the dotted line.

B Correct Option

Solution: (B)
In each of the response figures, the right halves are dotted, which indicates that the right half of the transparent sheet has been folded and placed over
the le half. Taking into consideration the design on the right half of the sheet, the design formed on the folded sheet will be a combination of the
designs on the two halves. Note here that the mirror image of the design on the right half of the sheet will reach the le half. Clearly option (b) is the
answer.

C Your answer is Wrong

Time taken to answer this question 00:04:07 hrs

https://gate.appliedroots.com/report?id=185806 23/35
5/15/2021 GATE CS Applied Course

Q.8) Subject: General Aptitude Max Marks: 2 

C Correct Option |  Attempted

Solution: (C)

Any angle subtended by a minor arc in the alternate segment is acute and any angle subtended by a major arc in the alternate segment is obtuse.
In the figure below

Time taken to answer this question 00:01:58 hrs

Q.9) Subject: General Aptitude Max Marks: 2 

A 2x

B 3x

C 5x Correct Option |  Attempted

Solution: (C)

https://gate.appliedroots.com/report?id=185806 24/35
5/15/2021 GATE CS Applied Course

D 1

Time taken to answer this question 00:03:46 hrs

Q.10) Subject: General Aptitude Max Marks: 2 


Completing the physical examination, the tonsils were found to be diseased.
Please select the correct option which indicates the best way of writing the above mentioned sentence.

A Completing the physical examination, the tonsils were found to be diseased.

B Having completed the physical examination, the tonsils were found to be diseased. Correct Option

Solution: (B)
Option (b) is the correct answer as it indicates the best way of writing with all the sentence formation to be correct.

C When the physical examination was completed, the tonsils were found to be diseased. Your answer is Wrong

D The physical examination completed, the tonsils were found to be diseased.

Time taken to answer this question 00:01:18 hrs

Q.1) Subject: DBMS Max Marks: 1 


Consider a Relation R1(P, Q, R, S, T, U, V) and the FD set
P -> T
QR -> SV
S -> U
Which of the following are true for the given relation R1?

A PR -> U

B QST -> Q Correct Option |  Attempted

Solution: (B)

C PQR -> TU Correct Option |  Attempted

Solution: (C)

https://gate.appliedroots.com/report?id=185806 25/35
5/15/2021 GATE CS Applied Course

D PQS -> R

Time taken to answer this question 00:02:27 hrs

Q.2) Subject: DBMS Max Marks: 1 


Consider the ER diagram:

Which of the following statement(s) is/are True?


NOTE: The arrows depict the relationship in between the entities.

A Trees inherit attributes of Plants Correct Option

Solution: (A)

Given the entities Living things, Animals, and Plants The relationship of Plants and Animals with Living things is many-to-one. That is many animals
and plants belong to one kind of living thing. Similarly, the relationship of Mammal, Reptiles, Trees, and Flowers is many-to-one with Animal and
Plants respectively.
Therefore, the primary key of Living things will work as foreign key(inherit attributes) for entities Animals and Plants. Similarly the primary keys of
entities Animals and Plants will work as foreign keys(inherit attributes) for Mammal, Reptiles, Trees, and Flowers. Therefore, option (i) and (iii) are
correct which says, entity trees inherit the attributes of entity plants and entity animals inherit attributes of entity living things.

B Living Thing inherit attributes of Plants Your answer is Wrong

C Animals inherit attributes of Living Things Correct Option

Solution: (C)

Given the entities Living things, Animals, and Plants The relationship of Plants and Animals with Living things is many-to-one. That is many animals
and plants belong to one kind of living thing. Similarly, the relationship of Mammal, Reptiles, Trees, and Flowers is many-to-one with Animal and
Plants respectively.
Therefore, the primary key of Living things will work as foreign key(inherit attributes) for entities Animals and Plants. Similarly the primary keys of
entities Animals and Plants will work as foreign keys(inherit attributes) for Mammal, Reptiles, Trees, and Flowers. Therefore, option (i) and (iii) are
correct which says, entity trees inherit the attributes of entity plants and entity animals inherit attributes of entity living things.

D Animals inherit attributes of Reptiles Your answer is Wrong

Time taken to answer this question 00:03:18 hrs

Q.3) Subject: C Programming Max Marks: 1 


Among the above list which of the following are string functions defined?

A strlen Correct Option |  Attempted

Solution: (A)

strlen: Computes string length


strchr: Search string for a character
strcat: Concatenating two strings
strcmp: Compare two strings

B strchr Correct Option |  Attempted

Solution: (B)

strlen: Computes string length


strchr: Search string for a character
strcat: Concatenating two strings
https://gate.appliedroots.com/report?id=185806 26/35
5/15/2021 GATE CS Applied Course

strcmp: Compare two strings

C strcat Correct Option |  Attempted

Solution: (C)

strlen: Computes string length


strchr: Search string for a character
strcat: Concatenating two strings
strcmp: Compare two strings

D strcmp Correct Option |  Attempted

Solution: (D)

strlen: Computes string length


strchr: Search string for a character
strcat: Concatenating two strings
strcmp: Compare two strings

Time taken to answer this question 00:01:51 hrs

Q.4) Subject: operating systems Max Marks: 1 


Which of the following scheduling could result in starvation?

A First-come, first-served

B Shortest job first Correct Option |  Attempted

Solution: (B)

C Round robin

D Priority Correct Option |  Attempted

Solution: (D)

Time taken to answer this question 00:00:09 hrs

Q.5) Subject: Theory of Computation Max Marks: 1 


Which of the following is/are False

A Any subset of a decidable set is decidable. Correct Option

https://gate.appliedroots.com/report?id=185806 27/35
5/15/2021 GATE CS Applied Course

Solution: (A)

B There is a decidable but not recognizable language. Correct Option |  Attempted

Solution: (B)

C Decidable sets are closed under complement.

D Every language reduces to its complement. Correct Option |  Attempted

Solution: (D)

Time taken to answer this question 00:03:30 hrs

Q.6) Subject: Discrete Mathematics Max Marks: 1 


If the number of edges a connected planar graph G with 3 vertices has and divides the plane into 8 regions
is x. What are not the values of x?

A 6 Correct Option |  Attempted

Solution: (A)

B 7 Correct Option

https://gate.appliedroots.com/report?id=185806 28/35
5/15/2021 GATE CS Applied Course

Solution: (B)

C 8 Correct Option |  Attempted

Solution: (C)

D 9 Your answer is Wrong

Time taken to answer this question 00:03:01 hrs

Q.7) Subject: operating systems Max Marks: 1 


Which of the following options is/are the correct way to pass parameters to the operating system?

A Using registers Correct Option |  Attempted

Solution: (A)

Refer : http://faculty.salina.k-state.edu/tim/ossg/Introduction/sys_calls.html

B Using block method Correct Option |  Attempted

https://gate.appliedroots.com/report?id=185806 29/35
5/15/2021 GATE CS Applied Course

Solution: (B)

Refer : http://faculty.salina.k-state.edu/tim/ossg/Introduction/sys_calls.html

C Using stack method Correct Option |  Attempted

Solution: (C)

Refer : http://faculty.salina.k-state.edu/tim/ossg/Introduction/sys_calls.html

D None of the above

Time taken to answer this question 00:02:29 hrs

Q.8) Subject: Discrete Mathematics Max Marks: 2 

A S1 is True, S2 is False Correct Option

Solution: (A)
S1 :
TRUE.
A surjection would hit all real numbers, but this hits only the square roots of naturals. It's an injection because every natural has a di erent square
root.
S2 :
FALSE.
There are one-to-one functions that are not onto, but this statement is true if the domain and range are finite sets of the same size.

B S1 is False, S2 is True Your answer is Wrong

C Both S1 and S2 are True Your answer is Wrong

D Both S1 and S2 are False Your answer is Wrong

Time taken to answer this question 00:05:07 hrs

Q.9) Subject: Data Structures Max Marks: 2 


Consider the following fragment of code. If the head of a non-empty linked list is passed to the function fun as
a parameter(consider the first element as an element at odd location).

https://gate.appliedroots.com/report?id=185806 30/35
5/15/2021 GATE CS Applied Course

Which of the following statements are TRUE

A The function returns the sum of elements of the linked list which are at even locations. Correct Option |  Attempted

Solution: (A)
Since the summation statement is in the if block with the condition i%2==0 the function returns the sum of even elements and the print statement is
present in the else block it prints the odd elements.

B The function returns the sum of elements of the linked list which are at odd locations.

C The function prints the elements of the linked list which are at even locations. Your answer is Wrong

D The function prints the elements of the linked list which are at odd locations. Correct Option

Solution: (D)
Since the summation statement is in the if block with the condition i%2==0 the function returns the sum of even elements and the print statement is
present in the else block it prints the odd elements.

Time taken to answer this question 00:00:20 hrs

Q.10) Subject: Computer Networks Max Marks: 2 


Which of the following statements are true about persistent HTTP connections?

A Persistent connections require less delay for multiple objects in the webpage. Correct Option |  Attempted

Solution: (A)
One TCP connection is su icient in the persistent HTTP , not requires the individual TCP connections.

B Individual TCP connections are required for every object in the web page for persistent HTTP. Your answer is Wrong

C Persistent HTTP shows the greatest performance advantage over nonpersistent HTTP when Correct Option |  Attempted
downloading a page with more objects.

Solution: (C)
One TCP connection is su icient in the persistent HTTP , not requires the individual TCP connections.

D When the server has finished sending data for all objects referenced by the initially requested page, the Correct Option |  Attempted
server closed the connection.

Solution: (D)
One TCP connection is su icient in the persistent HTTP , not requires the individual TCP connections.

Time taken to answer this question 00:00:43 hrs

Q.11) Subject: digital logic systems Max Marks: 2 


Which of the following statements are true?
https://gate.appliedroots.com/report?id=185806 31/35
5/15/2021 GATE CS Applied Course

A A don’t care in the excitation table indicates that the specific transition will take place irrespective of the Correct Option |  Attempted
variable under consideration being 0 or 1.

Solution: (A)
(i) This statement is correct because a don’t care is always considered as either 0 or 1 and can also indicate a specific transition in an excitation table.
(ii) A characteristic equation gives/represents the next state in terms of current state and output and not on the basis of current state (present input).
Therefore, this statement is false.
(iii) A state analysis of a flip flop can either be represented using a state diagram or verbally (text description). Therefore, this statement is true.
(iv) A state analysis table will have both the present state and next state and it depicts the transitions from one state to another in the form of the truth
table. Thus, this statement is also true.

B Characteristic equation of a flip flop is a minimized representation of the next state by considering present input only. Your answer is Wrong

C State analysis results of a flip flop are presented through a state transition diagram or through a text Correct Option |  Attempted
description.

Solution: (C)
(i) This statement is correct because a don’t care is always considered as either 0 or 1 and can also indicate a specific transition in an excitation table.
(ii) A characteristic equation gives/represents the next state in terms of current state and output and not on the basis of current state (present input).
Therefore, this statement is false.
(iii) A state analysis of a flip flop can either be represented using a state diagram or verbally (text description). Therefore, this statement is true.
(iv) A state analysis table will have both the present state and next state and it depicts the transitions from one state to another in the form of the truth
table. Thus, this statement is also true.

D The state analysis table lists all the inputs of the flip flop at a given state and finds out the next state Correct Option |  Attempted
using flip flop truth table and also notes the final output.

Solution: (D)
(i) This statement is correct because a don’t care is always considered as either 0 or 1 and can also indicate a specific transition in an excitation table.
(ii) A characteristic equation gives/represents the next state in terms of current state and output and not on the basis of current state (present input).
Therefore, this statement is false.
(iii) A state analysis of a flip flop can either be represented using a state diagram or verbally (text description). Therefore, this statement is true.
(iv) A state analysis table will have both the present state and next state and it depicts the transitions from one state to another in the form of the truth
table. Thus, this statement is also true.

Time taken to answer this question 00:00:59 hrs

Q.12) Subject: Algorithms Max Marks: 2 


Consider the following graph , which of the following statements are true

A Edges BD and DG are a part of every MST of the graph Correct Option |  Attempted

https://gate.appliedroots.com/report?id=185806 32/35
5/15/2021 GATE CS Applied Course

Solution: (A)

B The cost of the MST is 53

C The above graph has more than one MST Correct Option |  Attempted

Solution: (C)

D None of the above

Time taken to answer this question 00:03:44 hrs

Q.13) Subject: Computer Networks Max Marks: 2 


Which of the following statements is / are correct ?

A In the IPV4 header the maximum possible value TTL value is 256.

B The identification and the header checksum is of 16 bits in the IPv4 header. Correct Option |  Attempted

https://gate.appliedroots.com/report?id=185806 33/35
5/15/2021 GATE CS Applied Course

Solution: (B)
The size of TTL value is 8 bits.Form 8 bits the maximum value is 255
True both id and checksum is of 16 bits.
Excluding options it is 20 bytes which is 160 bits.
HLEN is use to calculate the size of header only.

C The size of IPV4 header is 162 bits excluding options.

D HLEN use to calculate the size of the header + data.

Time taken to answer this question 00:06:32 hrs

Q.14) Subject: Algorithms Max Marks: 2 


Consider the following text, ignoring the double quotes, spaces and punctuation marks.
“this is the secret.”
Which of the following statements are TRUE

A The height of the Hu man Tree which is created using the above message is 4 Correct Option

Solution: (A)
Following is one possible Hu man tree for the message

The total number of bits for the message “this is the secret” is 3*3+3*2+3*2+2*3+2*3+4*1+4*1=41.

B The height of the Hu man Tree which is created using the above message is 5 Your answer is Wrong

C The number of bits required to encode the above message using Hu man encoding is 42

D None of the above.

https://gate.appliedroots.com/report?id=185806 34/35
5/15/2021 GATE CS Applied Course

Time taken to answer this question 00:07:49 hrs

close

https://gate.appliedroots.com/report?id=185806 35/35

You might also like