GATE CSE 2022 question paper with solutions
All 65 questions of the GATE 2022 Computer Science and Information Technology paper, in order, with the official answer key from IIT Kharagpur.
Download the solved paper (PDF, 2.3 MB)- questions · 100 marks
- 65questions · 100 marks
- official answer key
- IIT Kharagpurofficial answer key
- question types
- 32 MCQ · 15 MSQ · 18 NATquestion types
GATE CSE 2022 answer key
| Question | Type | Marks | Answer |
|---|---|---|---|
| Q.1 | MCQ | 1 | D |
| Q.2 | MCQ | 1 | C |
| Q.3 | MCQ | 1 | D |
| Q.4 | MCQ | 1 | A |
| Q.5 | MCQ | 1 | B |
| Q.6 | MCQ | 2 | B |
| Q.7 | MCQ | 2 | D |
| Q.8 | MCQ | 2 | D |
| Q.9 | MCQ | 2 | B |
| Q.10 | MCQ | 2 | D |
| Q.11 | MCQ | 1 | A |
| Q.12 | MCQ | 1 | D |
| Q.13 | MCQ | 1 | D |
| Q.14 | MCQ | 1 | A |
| Q.15 | MCQ | 1 | A |
| Q.16 | MCQ | 1 | B |
| Q.17 | MCQ | 1 | A |
| Q.18 | MCQ | 1 | B |
| Q.19 | MCQ | 1 | C |
| Q.20 | MCQ | 1 | C |
| Q.21 | MCQ | 1 | D |
| Q.22 | MCQ | 1 | C |
| Q.23 | MSQ | 1 | B, C, D |
| Q.24 | MSQ | 1 | A, B, D |
| Q.25 | MSQ | 1 | A, B |
| Q.26 | MSQ | 1 | A, D |
| Q.27 | MSQ | 1 | A, B, C |
| Q.28 | NAT | 1 | 509 |
| Q.29 | NAT | 1 | 5 |
| Q.30 | NAT | 1 | 36 |
| Q.31 | NAT | 1 | 8 |
| Q.32 | NAT | 1 | 7 |
| Q.33 | NAT | 1 | 0.85 |
| Q.34 | NAT | 1 | -0.5 |
| Q.35 | NAT | 1 | 4 |
| Q.36 | MCQ | 2 | A |
| Q.37 | MCQ | 2 | D |
| Q.38 | MCQ | 2 | C |
| Q.39 | MCQ | 2 | A |
| Q.40 | MCQ | 2 | C |
| Q.41 | MCQ | 2 | B |
| Q.42 | MCQ | 2 | D |
| Q.43 | MCQ | 2 | A |
| Q.44 | MCQ | 2 | A |
| Q.45 | MCQ | 2 | D |
| Q.46 | MSQ | 2 | A, B, C |
| Q.47 | MSQ | 2 | A, B, C |
| Q.48 | MSQ | 2 | B, C, D |
| Q.49 | MSQ | 2 | A, B, C |
| Q.50 | MSQ | 2 | A, B, C |
| Q.51 | MSQ | 2 | A, B, C |
| Q.52 | MSQ | 2 | A |
| Q.53 | MSQ | 2 | A, C, D |
| Q.54 | MSQ | 2 | A, B, D |
| Q.55 | MSQ | 2 | B, D |
| Q.56 | NAT | 2 | 2 |
| Q.57 | NAT | 2 | 0.5 |
| Q.58 | NAT | 2 | 24 |
| Q.59 | NAT | 2 | 7.07 to 7.09 |
| Q.60 | NAT | 2 | 33 |
| Q.61 | NAT | 2 | 1.42 to 1.45 |
| Q.62 | NAT | 2 | 0 |
| Q.63 | NAT | 2 | 153 |
| Q.64 | NAT | 2 | 0.6 |
| Q.65 | NAT | 2 | 80 |
General Aptitude Q.1 to Q.10
- Q.1MCQ · 1 mark
The ______ is too high for it to be considered ______.
- (A)
fair / fare
- (B)
faer / fair
- (C)
fare / fare
- (D)
fare / fair
Official answer: D
- (A)
- Q.2MCQ · 1 mark
A function y(x) is defined in the interval [0, 1] on the x-axis as
y(x) = 2 if 0 ≤ x < 1/3; 3 if 1/3 ≤ x < 3/4; 1 if 3/4 ≤ x ≤ 1.
Which one of the following is the area under the curve for the interval [0, 1] on the x-axis?
- (A)
- (B)
- (C)
- (D)
Official answer: C
- (A)
- Q.3MCQ · 1 mark
Let be a root of the equation .
Then the value of the expression is
- (A)
- (B)
- (C)
- (D)
Official answer: D
- (A)
- Q.4MCQ · 1 mark
Given below are four statements.
Statement 1: All students are inquisitive.
Statement 2: Some students are inquisitive.
Statement 3: No student is inquisitive.
Statement 4: Some students are not inquisitive.
From the given four statements, find the two statements that CANNOT BE TRUE simultaneously, assuming that there is at least one student in the class.
- (A)
Statement 1 and Statement 3
- (B)
Statement 1 and Statement 2
- (C)
Statement 2 and Statement 4
- (D)
Statement 3 and Statement 4
Official answer: A
- (A)
- Q.5MCQ · 1 mark
A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has the following two plates painted with letters.
[plates: A and D]
From the additional plates given in the options, which one of the combinations of additional plates would allow the player to construct a five-letter palindrome. The player should use all the five plates exactly once. The plates can be rotated in their plane.
Tap to open full size- (A)
Three plates: D, a D turned on its side, J
- (B)
Three plates: R, an A turned upside down, an R drawn as a reflection
- (C)
Three plates: Z (drawn turned, as N), an E turned, D
- (D)
Three plates: I, an L turned through 180 degrees, Y
Official answer: B
- (A)
- Q.6MCQ · 2 marks
Some people believe that “what gets measured, improves”. Some others believe that “what gets measured, gets gamed”. One possible reason for the difference in the beliefs is the work culture in organizations. In organizations with good work culture, metrics help improve outcomes. However, the same metrics are counterproductive in organizations with poor work culture.
Which one of the following is the CORRECT logical inference based on the information in the above passage?
- (A)
Metrics are useful in organizations with poor work culture
- (B)
Metrics are useful in organizations with good work culture
- (C)
Metrics are always counterproductive in organizations with good work culture
- (D)
Metrics are never useful in organizations with good work culture
Official answer: B
- (A)
- Q.7MCQ · 2 marks
In a recently conducted national entrance test, boys constituted 65% of those who appeared for the test. Girls constituted the remaining candidates and they accounted for 60% of the qualified candidates.
Which one of the following is the correct logical inference based on the information provided in the above passage?
- (A)
Equal number of boys and girls qualified
- (B)
Equal number of boys and girls appeared for the test
- (C)
The number of boys who appeared for the test is less than the number of girls who appeared
- (D)
The number of boys who qualified the test is less than the number of girls who qualified
Official answer: D
- (A)
- Q.8MCQ · 2 marks
A box contains five balls of same size and shape. Three of them are green coloured balls and two of them are orange coloured balls. Balls are drawn from the box one at a time. If a green ball is drawn, it is not replaced. If an orange ball is drawn, it is replaced with another orange ball.
First ball is drawn. What is the probability of getting an orange ball in the next draw?
- (A)
- (B)
- (C)
- (D)
Official answer: D
- (A)
- Q.9MCQ · 2 marks
The corners and mid-points of the sides of a triangle are named using the distinct letters P, Q, R, S, T and U, but not necessarily in the same order. Consider the following statements:
- The line joining P and R is parallel to the line joining Q and S.
- P is placed on the side opposite to the corner T.
- S and U cannot be placed on the same side.
Which one of the following statements is correct based on the above information?
- (A)
P cannot be placed at a corner
- (B)
S cannot be placed at a corner
- (C)
U cannot be placed at a mid-point
- (D)
R cannot be placed at a corner
Official answer: B
- Q.10MCQ · 2 marks
A plot of land must be divided between four families. They want their individual plots to be similar in shape, not necessarily equal in area. The land has equally spaced poles, marked as dots in the below figure. Two ropes, R1 and R2, are already present and cannot be moved.
What is the least number of additional straight ropes needed to create the desired plots? A single rope can pass through three poles that are aligned in a straight line.
Tap to open full size- (A)
2
- (B)
4
- (C)
5
- (D)
3
Official answer: D
- (A)
Computer Science and Information Technology Q.11 to Q.65
- Q.11MCQ · 1 mark
Which one of the following statements is TRUE for all positive functions ?
- (A)
, when is a polynomial
- (B)
- (C)
, when is an exponential function
- (D)
Official answer: A
- (A)
- Q.12MCQ · 1 mark
Which one of the following regular expressions correctly represents the language of the finite automaton given below?
Tap to open full size- (A)
- (B)
- (C)
- (D)
Official answer: D
- (A)
- Q.13MCQ · 1 mark
Which one of the following statements is TRUE?
- (A)
The parser for a grammar cannot have reduce-reduce conflict if the parser for does not have reduce-reduce conflict.
- (B)
Symbol table is accessed only during the lexical analysis phase.
- (C)
Data flow analysis is necessary for run-time memory management.
- (D)
parsing is sufficient for deterministic context-free languages.
Official answer: D
- (A)
- Q.14MCQ · 1 mark
In a relational data model, which one of the following statements is TRUE?
- (A)
A relation with only two attributes is always in BCNF.
- (B)
If all attributes of a relation are prime attributes, then the relation is in BCNF.
- (C)
Every relation has at least one non-prime attribute.
- (D)
BCNF decompositions preserve functional dependencies.
Official answer: A
- (A)
- Q.15MCQ · 1 mark
Consider the problem of reversing a singly linked list. To take an example, given the linked list below,
head → [a|•]→ [b|•]→ [c|•]→ [d|•]→ [e|•]→ (null, shown as ground symbol)
the reversed linked list should look like
head → [e|•]→ [d|•]→ [c|•]→ [b|•]→ [a|•]→ (null, shown as ground symbol)
Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in space?
Tap to open full size- (A)
The best algorithm for the problem takes time in the worst case.
- (B)
The best algorithm for the problem takes time in the worst case.
- (C)
The best algorithm for the problem takes time in the worst case.
- (D)
It is not possible to reverse a singly linked list in space.
Official answer: A
- (A)
- Q.16MCQ · 1 mark
Suppose we are given keys, hash table slots, and two simple uniform hash functions and . Further suppose our hashing scheme uses for the odd keys and for the even keys. What is the expected number of keys in a slot?
- (A)
- (B)
- (C)
- (D)
Official answer: B
- (A)
- Q.17MCQ · 1 mark
Which one of the following facilitates transfer of bulk data from hard disk to main memory with the highest throughput?
- (A)
DMA based I/O transfer
- (B)
Interrupt driven I/O transfer
- (C)
Polling based I/O transfer
- (D)
Programmed I/O transfer
Official answer: A
- (A)
- Q.18MCQ · 1 mark
Let R1 and R2 be two 4-bit registers that store numbers in 2's complement form. For the operation R1+R2, which one of the following values of R1 and R2 gives an arithmetic overflow?
- (A)
R1 = 1011 and R2 = 1110
- (B)
R1 = 1100 and R2 = 1010
- (C)
R1 = 0011 and R2 = 0100
- (D)
R1 = 1001 and R2 = 1111
Official answer: B
- (A)
- Q.19MCQ · 1 mark
Consider the following threads, T1, T2, and T3 executing on a single processor, synchronized using three binary semaphore variables, S1, S2, and S3, operated upon using standard
wait()andsignal(). The threads can be context switched in any order and at any time.Which initialization of the semaphores would print the sequence BCABCABCA....?
Tap to open full size- (A)
S1 = 1; S2 = 1; S3 = 1
- (B)
S1 = 1; S2 = 1; S3 = 0
- (C)
S1 = 1; S2 = 0; S3 = 0
- (D)
S1 = 0; S2 = 1; S3 = 1
Official answer: C
- (A)
- Q.20MCQ · 1 mark
Consider the following two statements with respect to the matrices , , and .
Statement 1:
Statement 2:
where represents the trace of a matrix. Which one of the following holds?
- (A)
Statement 1 is correct and Statement 2 is wrong.
- (B)
Statement 1 is wrong and Statement 2 is correct.
- (C)
Both Statement 1 and Statement 2 are correct.
- (D)
Both Statement 1 and Statement 2 are wrong.
Official answer: C
- (A)
- Q.21MCQ · 1 mark
What is printed by the following ANSI C program?
#include<stdio.h> int main(int argc, char *argv[]) { int x = 1, z[2] = {10, 11}; int *p = NULL; p = &x; *p = 10; p = &z[1]; *(&z[0] + 1) += 3; printf("%d, %d, %d\n", x, z[0], z[1]); return 0; }- (A)
1, 10, 11
- (B)
1, 10, 14
- (C)
10, 14, 11
- (D)
10, 10, 14
Official answer: D
- (A)
- Q.22MCQ · 1 mark
Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below.
What is the number of subnets inside the enterprise network?
Tap to open full size- (A)
3
- (B)
12
- (C)
6
- (D)
8
Official answer: C
- (A)
- Q.23MSQ · 1 mark
Which of the following statements is/are TRUE?
- (A)
Every subset of a recursively enumerable language is recursive.
- (B)
If a language and its complement are both recursively enumerable, then must be recursive.
- (C)
Complement of a context-free language must be recursive.
- (D)
If and are regular, then must be deterministic context-free.
Official answer: B, C, D
- (A)
- Q.24MSQ · 1 mark
Let WB and WT be two set associative cache organizations that use LRU algorithm for cache block replacement. WB is a write back cache and WT is a write through cache. Which of the following statements is/are FALSE?
- (A)
Each cache block in WB and WT has a dirty bit.
- (B)
Every write hit in WB leads to a data transfer from cache to main memory.
- (C)
Eviction of a block from WT will not lead to data transfer from cache to main memory.
- (D)
A read miss in WB will never lead to eviction of a dirty block from WB.
Official answer: A, B, D
- (A)
- Q.25MSQ · 1 mark
Consider the following three relations in a relational database.
, ,
Which of the following relational algebra expressions return the set of s who own all the brands?
- (A)
- (B)
- (C)
- (D)
Official answer: A, B
- (A)
- Q.26MSQ · 1 mark
Which of the following statements is/are TRUE with respect to deadlocks?
- (A)
Circular wait is a necessary condition for the formation of deadlock.
- (B)
In a system where each resource has more than one instance, a cycle in its wait-for graph indicates the presence of a deadlock.
- (C)
If the current allocation of resources to processes leads the system to unsafe state, then deadlock will necessarily occur.
- (D)
In the resource-allocation graph of a system, if every edge is an assignment edge, then the system is not in deadlock state.
Official answer: A, D
- (A)
- Q.27MSQ · 1 mark
Which of the following statements is/are TRUE for a group ?
- (A)
If for all , , then is commutative.
- (B)
If for all , , then is commutative. Here, is the identity element of .
- (C)
If the order of is , then is commutative.
- (D)
If is commutative, then a subgroup of need not be commutative.
Official answer: A, B, C
- (A)
- Q.28NAT · 1 mark
Suppose a binary search tree with 1000 distinct elements is also a complete binary tree. The tree is stored using the array representation of binary heap trees. Assuming that the array indices start with 0, the 3rd largest element of the tree is stored at index ____.
Official answer: 509
- Q.29NAT · 1 mark
Consider the augmented grammar with {+, *, (, ), id} as the set of terminals.
S' -> S S -> S + R | R R -> R * P | P P -> ( S ) | idIf is the set of two LR(0) items , then contains exactly ______ items.
Official answer: 5
- Q.30NAT · 1 mark
Consider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of edges it can have is ____________.
Official answer: 36
- Q.31NAT · 1 mark
Consider a relation with the following three functional dependencies.
The number of superkeys in the relation R is ______.
Official answer: 8
- Q.32NAT · 1 mark
The number of arrangements of six identical balls in three identical bins is ______.
Official answer: 7
- Q.33NAT · 1 mark
A cache memory that has a hit rate of 0.8 has an access latency 10 ns and miss penalty 100 ns. An optimization is done on the cache to reduce the miss rate. However, the optimization results in an increase of cache access latency to 15 ns, whereas the miss penalty is not affected. The minimum hit rate (rounded off to two decimal places) needed after the optimization such that it should not increase the average memory access time is ____.
Official answer: 0.85
- Q.34NAT · 1 mark
The value of the following limit is _____________.
Official answer: -0.5
- Q.35NAT · 1 mark
Consider the resolution of the domain name
www.gate.org.inby a DNS resolver. Assume that no resource records are cached anywhere across the DNS servers and that iterative query mechanism is used in the resolution. The number of DNS query-response pairs involved in completely resolving the domain name is ______.Official answer: 4
- Q.36MCQ · 2 marks
Which one of the following is the closed form for the generating function of the sequence defined below?
- (A)
- (B)
- (C)
- (D)
Official answer: A
- (A)
- Q.37MCQ · 2 marks
Consider a simple undirected unweighted graph with at least three vertices. If is the adjacency matrix of the graph, then the number of 3-cycles in the graph is given by the trace of
- (A)
- (B)
divided by 2
- (C)
divided by 3
- (D)
divided by 6
Official answer: D
- (A)
- Q.38MCQ · 2 marks
Which one of the following statements is FALSE?
- (A)
The TLB performs an associative search in parallel on all its valid entries using page number of incoming virtual address.
- (B)
If the virtual address of a word given by CPU has a TLB hit, but the subsequent search for the word results in a cache miss, then the word will always be present in the main memory.
- (C)
The memory access time using a given inverted page table is always same for all incoming virtual addresses.
- (D)
In a system that uses hashed page tables, if two distinct virtual addresses V1 and V2 map to the same value while hashing, then the memory access time of these addresses will not be the same.
Official answer: C
- (A)
- Q.39MCQ · 2 marks
Let and denote read and write operations on a data element by a transaction , respectively. Consider the schedule with four transactions.
Which one of the following serial schedules is conflict equivalent to ?
- (A)
- (B)
- (C)
- (D)
Official answer: A
- (A)
- Q.40MCQ · 2 marks
Consider a digital display system (DDS) shown in the figure that displays the contents of register X. A 16-bit code word is used to load a word in X, either from S or from R. S is a 1024-word memory segment and R is a 32-word register file. Based on the value of mode bit M, T selects an input word to load in X. P and Q interface with the corresponding bits in the code word to choose the addressed word. Which one of the following represents the functionality of P, Q, and T?
Tap to open full size- (A)
P is 10:1 multiplexer; Q is 5:1 multiplexer; T is 2:1 multiplexer
- (B)
P is 10:2^10 decoder; Q is 5:2^5 decoder; T is 2:1 encoder
- (C)
P is 10:2^10 decoder; Q is 5:2^5 decoder; T is 2:1 multiplexer
- (D)
P is 1:10 de-multiplexer; Q is 1:5 de-multiplexer; T is 2:1 multiplexer
Official answer: C
- (A)
- Q.41MCQ · 2 marks
Consider three floating point numbers , and stored in registers , and , respectively as per IEEE-754 single precision floating point format. The 32-bit content stored in these registers (in hexadecimal form) are as follows.
= 0xC1400000, = 0x42100000, = 0x41400000
Which one of the following is FALSE?
- (A)
- (B)
- (C)
- (D)
Official answer: B
- (A)
- Q.42MCQ · 2 marks
Consider four processes P, Q, R, and S scheduled on a CPU as per round robin algorithm with a time quantum of 4 units. The processes arrive in the order P, Q, R, S, all at time t = 0. There is exactly one context switch from S to Q, exactly one context switch from R to Q, and exactly two context switches from Q to R. There is no context switch from S to P. Switching to a ready process after the termination of another process is also considered a context switch. Which one of the following NOT possible as CPU burst time (in time units) of these processes?
- (A)
P = 4, Q = 10, R = 6, S = 2
- (B)
P = 2, Q = 9, R = 5, S = 1
- (C)
P = 4, Q = 12, R = 5, S = 4
- (D)
P = 3, Q = 7, R = 7, S = 3
Official answer: D
- (A)
- Q.43MCQ · 2 marks
What is printed by the following ANSI C program?
#include<stdio.h> int main(int argc, char *argv[]) { int a[3][3][3] = {{1, 2, 3, 4, 5, 6, 7, 8, 9}, {10, 11, 12, 13, 14, 15, 16, 17, 18}, {19, 20, 21, 22, 23, 24, 25, 26, 27}}; int i = 0, j = 0, k = 0; for( i = 0; i < 3; i++ ){ for(k = 0; k < 3; k++ ) printf("%d ", a[i][j][k]); printf("\n"); } return 0; }- (A)
1 2 3
10 11 12
19 20 21 - (B)
1 4 7
10 13 16
19 22 25 - (C)
1 2 3
4 5 6
7 8 9 - (D)
1 2 3
13 14 15
25 26 27
Official answer: A
- (A)
- Q.44MCQ · 2 marks
What is printed by the following ANSI C program?
#include<stdio.h> int main(int argc, char *argv[]){ char a = 'P'; char b = 'x'; char c = (a & b) + '*'; char d = (a | b) - '-'; char e = (a ^ b) + '+'; printf("%c %c %c\n", c, d, e); return 0; }ASCII encoding for relevant characters is given below: A=65, B=66, C=67, ..., Z=90; a=97, b=98, c=99, ..., z=122; *=42, +=43, -=45.
Tap to open full size- (A)
z K S
- (B)
122 75 83
- (C)
- - +
- (D)
P x +
Official answer: A
- (A)
- Q.45MCQ · 2 marks
Consider solving the following system of simultaneous equations using LU decomposition.
where and are denoted as
Which one of the following is the correct combination of values for , , and ?
- (A)
- (B)
- (C)
- (D)
Official answer: D
- (A)
- Q.46MSQ · 2 marks
Which of the following is/are undecidable?
- (A)
Given two Turing machines and , decide if .
- (B)
Given a Turing machine , decide if is regular.
- (C)
Given a Turing machine , decide if accepts all strings.
- (D)
Given a Turing machine , decide if takes more than steps on every string.
Official answer: A, B, C
- (A)
- Q.47MSQ · 2 marks
Consider the following languages:
Note that is the reversal of the string . Which of the following is/are TRUE?
- (A)
and are regular.
- (B)
and are context-free.
- (C)
is regular and is context-free.
- (D)
and are context-free but not regular.
Official answer: A, B, C
- (A)
- Q.48MSQ · 2 marks
Consider the following languages:
Which of the following statements is/are FALSE?- (A)
is not context-free but and are deterministic context-free.
- (B)
Neither nor is context-free.
- (C)
, and all are context-free.
- (D)
Neither nor its complement is context-free.
Official answer: B, C, D
- (A)
- Q.49MSQ · 2 marks
Consider a simple undirected weighted graph , all of whose edge weights are distinct. Which of the following statements about the minimum spanning trees of is/are TRUE?
- (A)
The edge with the second smallest weight is always part of any minimum spanning tree of .
- (B)
One or both of the edges with the third smallest and the fourth smallest weights are part of any minimum spanning tree of .
- (C)
Suppose be such that and . Consider the edge with the minimum weight such that one of its vertices is in and the other in . Such an edge will always be part of any minimum spanning tree of .
- (D)
can have multiple minimum spanning trees.
Official answer: A, B, C
- (A)
- Q.50MSQ · 2 marks
The following simple undirected graph is referred to as the Peterson graph. Which of the following statements is/are TRUE?
Tap to open full size- (A)
The chromatic number of the graph is 3.
- (B)
The graph has a Hamiltonian path.
- (C)
The following graph is isomorphic to the Peterson graph. [Figure — a 9-cycle of boundary vertices plus a centre vertex, with six chords as described]
- (D)
The size of the largest independent set of the given graph is 3. (A subset of vertices of a graph form an independent set if no two vertices of the subset are adjacent.)
Official answer: A, B, C
- (A)
- Q.51MSQ · 2 marks
Consider the following recurrence:
Then, which of the following statements is/are TRUE?
- (A)
- (B)
- (C)
- (D)
Official answer: A, B, C
- (A)
- Q.52MSQ · 2 marks
Which of the properties hold for the adjacency matrix of a simple undirected unweighted graph having vertices?
- (A)
The diagonal entries of are the degrees of the vertices of the graph.
- (B)
If the graph is connected, then none of the entries of can be zero.
- (C)
If the sum of all the elements of is at most , then the graph must be acyclic.
- (D)
If there is at least a 1 in each of 's rows and columns, then the graph must be connected.
Official answer: A
- (A)
- Q.53MSQ · 2 marks
Which of the following is/are the eigenvector(s) for the matrix given below?
- (A)
- (B)
- (C)
- (D)
Official answer: A, C, D
- (A)
- Q.54MSQ · 2 marks
Consider a system with 2 KB direct mapped data cache with a block size of 64 bytes. The system has a physical address space of 64 KB and a word length of 16 bits. During the execution of a program, four data words P, Q, R, and S are accessed in that order 10 times (i.e., PQRSPQRS…). Hence, there are 40 accesses to data cache altogether. Assume that the data cache is initially empty and no other data words are accessed by the program. The addresses of the first bytes of P, Q, R, and S are 0xA248, 0xC28A, 0xCA8A, and 0xA262, respectively. For the execution of the above program, which of the following statements is/are TRUE with respect to the data cache?
- (A)
Every access to S is a hit.
- (B)
Once P is brought to the cache it is never evicted.
- (C)
At the end of the execution only R and S reside in the cache.
- (D)
Every access to R evicts Q from the cache.
Official answer: A, B, D
- (A)
- Q.55MSQ · 2 marks
Consider routing table of an organization's router shown below:
Which of the following prefixes in CIDR notation can be collectively used to correctly aggregate all of the subnets in the routing table?
- (A)
12.20.164.0/20
- (B)
12.20.164.0/22
- (C)
12.20.164.0/21
- (D)
12.20.168.0/22
Official answer: B, D
- (A)
- Q.56NAT · 2 marks
Consider the relational database with the following four schemas and their respective instances.
Student(sNo, sName, dNo) Dept(dNo, dName)
Course(cNo, cName, dNo) Register(sNo, cNo)Student: (S01, James, D01), (S02, Rocky, D01), (S03, Jackson, D02), (S04, Jane, D01), (S05, Milli, D02)
Dept: (D01, CSE), (D02, EEE)
Course: (C11, DS, D01), (C12, OS, D01), (C21, DE, D02), (C22, PT, D02), (C23, CV, D03)
Register: (S01, C11), (S01, C12), (S02, C11), (S03, C21), (S03, C22), (S03, C23), (S04, C11), (S04, C12), (S05, C11), (S05, C21)SQL Query:
SELECT * FROM Student AS S WHERE NOT EXIST (SELECT cNo FROM Course WHERE dNo = "D01" EXCEPT SELECT cNo FROM Register WHERE sNo = S.sNo)The number of rows returned by the above SQL query is ______.
Tap to open full sizeOfficial answer: 2
- Q.57NAT · 2 marks
Consider a network with three routers P, Q, R shown in the figure below. All the links have cost of unity. The routers exchange distance vector routing information and have converged on the routing tables, after which the link Q-R fails. Assume that P and Q send out routing updates at random times, each at the same average rate. The probability of a routing loop formation (rounded off to one decimal place) between P and Q, leading to count-to-infinity problem, is ______.
Tap to open full sizeOfficial answer: 0.5
- Q.58NAT · 2 marks
Let be a directed graph, where is the set of vertices and is the set of directed edges, as defined by the following adjacency matrix .
indicates a directed edge from node to node . A directed spanning tree of , rooted at , is defined as a subgraph of such that the undirected version of is a tree, and contains a directed path from to every other vertex in . The number of such directed spanning trees rooted at vertex is ______.
Official answer: 24
- Q.59NAT · 2 marks
Consider a 100 Mbps link between an earth station (sender) and a satellite (receiver) at an altitude of 2100 km. The signal propagates at a speed of m/s. The time taken (in milliseconds, rounded off to two decimal places) for the receiver to completely receive a packet of 1000 bytes transmitted by the sender is ______.
Official answer: 7.07 to 7.09
- Q.60NAT · 2 marks
Consider the data transfer using TCP over a 1 Gbps link. Assuming that the maximum segment lifetime (MSL) is set to 60 seconds, the minimum number of bits required for the sequence number field of the TCP header, to prevent the sequence number space from wrapping around during the MSL is ______.
Official answer: 33
- Q.61NAT · 2 marks
A processor X₁ operating at 2 GHz has a standard 5-stage RISC instruction pipeline having a base CPI (cycles per instruction) of one without any pipeline hazards. For a given program P that has 30% branch instructions, control hazards incur 2 cycles stall for every branch. A new version of the processor X₂ operating at same clock frequency has an additional branch predictor unit (BPU) that completely eliminates stalls for correctly predicted branches. There is neither any savings nor any additional stalls for wrong predictions. There are no structural hazards and data hazards for X₁ and X₂. If the BPU has a prediction accuracy of 80%, the speed up (rounded off to two decimal places) obtained by X₂ over X₁ in executing P is ____.
Official answer: 1.42 to 1.45
- Q.62NAT · 2 marks
Consider the queues containing four elements and containing none (shown as the Initial State in the figure). The only operations allowed on these two queues are
Enqueue(Q, element)andDequeue(Q). The minimum number ofEnqueueoperations on required to place the elements of in in reverse order (shown as the Final State in the figure) without using any additional storage is ______.
Tap to open full sizeOfficial answer: 0
- Q.63NAT · 2 marks
Consider two files systems and , that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in and also in . Now, consider inserting a new block in the middle of the file (between 50th and 51st block), whose data is already available in the memory. Assume that there are enough free blocks at the end of the file and that the file control blocks are already in memory. Let the number of disk accesses required to insert a block in the middle of the file in and are and , respectively, then the value of is ______.
Official answer: 153
- Q.64NAT · 2 marks
Consider a demand paging system with four page frames (initially empty) and LRU page replacement policy. For the following page reference string
7, 2, 7, 3, 2, 5, 3, 4, 6, 7, 7, 1, 5, 6, 1
the page fault rate, defined as the ratio of number of page faults to the number of memory accesses (rounded off to one decimal place) is ______.
Official answer: 0.6
- Q.65NAT · 2 marks
Consider the following grammar along with translation rules.
Here # and % are operators and is a token that represents an integer and represents the corresponding integer value. The set of non-terminals is and a subscripted non-terminal indicates an instance of the non-terminal.
Using this translation scheme, the computed value of for root of the parse tree for the expression 20#10%5#8%2%2 is ______.
Official answer: 80