Gate 2022 Computer Science and Information Technology (CS) Question Paper with Solutions PDFs are available for download. GATE 2022 CS was successfully concluded on 5th February from 9 AM to 12 PM. This year, IIT Kharagpur took charge to conduct GATE examination. A total of 65 questions constituted the question paper of GATE CS 2022. The overall difficulty level of GATE 2022 CS question paper was rated moderate to tough. The General Aptitude section was moderate.
Candidates preparing for GATE 2023 can download GATE 2022 CS Question Paper with Anwer Key PDFs given below.
Gate 2022 Computer Science and Information Technology (CS) Question Paper with Solutions
| GATE 2022 Computer Science and Information Technology (CS) Question Paper | Check Solutions |

The _________ is too high for it to be considered _________.
A function \( y(x) \) is defined in the interval [0, 1] on the x-axis as
\[ y(x) = \begin{cases} 2 & if 0 \leq x < \frac{1}{3}
3 & if \frac{1}{3} \leq x < \frac{3}{4}
1 & if \frac{3}{4} \leq x \leq 1 \end{cases} \]
Which one of the following is the area under the curve for the interval [0, 1] on the x-axis?
Let \(r\) be a root of the equation \(x^2 + 2x + 6 = 0\). Then the value of the expression \((r+2)(r+3)(r+4)(r+5)\) is
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 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.

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.
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?
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 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?
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 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.

Which one of the following statements is TRUE for all positive functions \( f(n) \)?
Which one of the following regular expressions correctly represents the language of the finite automaton given below?

Which one of the following statements is TRUE?
In a relational data model, which one of the following statements is TRUE?
Consider the problem of reversing a singly linked list. To take an example, given the linked list below,

Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in \( O(1) \) space?
Suppose we are given \(n\) keys, \(m\) hash table slots, and two simple uniform hash functions \(h_1\) and \(h_2\). Further suppose our hashing scheme uses \(h_1\) for the odd keys and \(h_2\) for the even keys. What is the expected number of keys in a slot?
Which one of the following facilitates transfer of bulk data from hard disk to main memory with the highest throughput?
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?
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() and signal(). The threads can be context switched in any order and at any time.

What is printed by the following ANSI C program?

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?
Which of the following statements is/are TRUE?
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?
Consider the following three relations in a relational database.
Employee(\(eId\), Name), Brand(\(bld\), bName), Own(\(eId\), \(bld\))
Which of the following relational algebra expressions return the set of \(eId\)'s who own all the brands?
Which of the following statements is/are TRUE with respect to deadlocks?
Which of the following statements is/are TRUE for a group \( G \)?
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 ______.
Consider the augmented grammar with {+, , (, ), id} as the set of terminals.
\[ S' \rightarrow S \] \[ S \rightarrow S + R \mid R \] \[ R \rightarrow R P \mid P \] \[ P \rightarrow (S) \mid id \]
If \(I_0\) is the set of two LR(0) items \{[S' \(\rightarrow\) S.], [S \(\rightarrow\) S. + R]\, then \(goto(closure(I_0), +)\) contains exactly ______ items.
Consider a simple undirected graph of 10 vertices. If the graph is disconnected, then the maximum number of edges it can have is
Consider a relation \(R(A, B, C, D, E)\) with the following three functional dependencies: \[ AB \rightarrow C, \quad BC \rightarrow D, \quad C \rightarrow E \]
The number of superkeys in the relation is
The number of arrangements of six identical balls in three identical bins is
A cache memory that has a hit rate of 0.8 has an access latency of 10 ns and a miss penalty of 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 ______.
The value of the following limit is ______. \[ \lim_{x \to 0^+} \frac{\sqrt{x}}{1 - e^{2\sqrt{x}}} \]
Consider the resolution of the domain name www.gate.org.in by a DNS resolver. Assume that no resource records are cached anywhere across the DNS servers and that the iterative query mechanism is used in the resolution. The number of DNS query-response pairs involved in completely resolving the domain name is ______.
Which one of the following is the closed form for the generating function of the sequence \( \{ a_n \}_{n \geq 0} \) defined below?

Consider a simple undirected unweighted graph with at least three vertices. If \( A \) is the adjacency matrix of the graph, then the number of 3-cycles in the graph is given by the trace of
Which one of the following statements is FALSE?
Let \(R(z)\) and \(W(z)\) denote read and write operations on a data element \(z\) by a transaction \(T_i\), respectively. Consider the schedule \(S\) with four transactions.
\[ S: R_1(x) R_2(x) R_3(y) W_1(y) W_2(x) W_3(y) R_4(y) \]
Which one of the following serial schedules is conflict equivalent to \(S\)?
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?

Consider three floating point numbers \(A\), \(B\) and \(C\) stored in registers \(R_A\), \(R_B\) and \(R_C\), respectively as per IEEE-754 single precision floating point format. The 32-bit content stored in these registers (in hexadecimal form) are as follows.
\(R_A = 0xC1400000\), \(R_B = 0x42100000\), \(R_C = 0x41400000\)
Which one of the following is FALSE?
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 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 is NOT possible as CPU burst time (in time units) of these processes?
What is printed by the following ANSI C program?

What is printed by the following ANSI C program?|

Consider solving the following system of simultaneous equations using LU decomposition.
\[ x_1 + x_2 - 2x_3 = 4
x_1 + 3x_2 - x_3 = 7
2x_1 + x_2 - 5x_3 = 7 \]
where \( L \) and \( U \) are denoted as
\[ L = \begin{pmatrix} L_{11} & 0 & 0
L_{21} & L_{22} & 0
L_{31} & L_{32} & L_{33} \end{pmatrix}, \quad U = \begin{pmatrix} U_{11} & U_{12} & U_{13}
0 & U_{22} & U_{23}
0 & 0 & U_{33} \end{pmatrix} \]
Which one of the following is the correct combination of values for \( L_{32}, U_{33}, \) and \( x_1 \)?
Which of the following is/are undecidable?
Consider the following languages:
\[ L_1 = \{a^n w a^n | w \in \{a, b\}^\} \] \[ L_2 = \{ w x w^R | w, x \in \{a, b\}^, |w|, |x| > 0 \} \]
Note that \( w^R \) is the reversal of the string \( w \). Which of the following is/are TRUE?
Consider the following languages:
\( L_1 = \{ ww \mid w \in \{a,b\}^ \} \)
\( L_2 = \{ a^m b^m c^n \mid m, n \geq 0 \} \)
\( L_3 = \{ a^m b^n c^n \mid m, n \geq 0 \} \)
Which of the following statements is/are FALSE?
Consider a simple undirected weighted graph \(G\), all of whose edge weights are distinct. Which of the following statements about the minimum spanning trees of \(G\) is/are TRUE?
The following simple undirected graph is referred to as the Peterson graph.

Which of the following statements is/are TRUE?
Consider the following recurrence:
\[ f(1) = 1; \] \[ f(2n) = 2f(n) - 1, for n \geq 1; \] \[ f(2n+1) = 2f(n) + 1, for n \geq 1. \]
Then, which of the following statements is/are TRUE?
Which of the properties hold for the adjacency matrix \( A \) of a simple undirected unweighted graph having \( n \) vertices?
Which of the following is/are the eigenvector(s) for the matrix given below?
\[ \begin{pmatrix} -9 & -6 & -2 & -4
-8 & -6 & -3 & -1
20 & 15 & 8 & 5
32 & 21 & 7 & 12 \end{pmatrix} \]
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?
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?
Consider the relational database with the following four schemas and their respective instances.

The number of rows returned by the above SQL query is___________.
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 ______.
Let \( G(V, E) \) be a directed graph, where \( V = \{1, 2, 3, 4, 5\} \) is the set of vertices and \( E \) is the set of directed edges, as defined by the following adjacency matrix \( A \): \[ A[i][j] = \begin{cases} 1, & 1 \leq j \leq 5
0, & otherwise \end{cases} \]
A[i][j] = 1 indicates a directed edge from node i to node j. A directed spanning tree of \( G \), rooted at \( r \in V \), is defined as a subgraph \( T \) of \( G \) such that the undirected version of \( T \) is a tree, and \( T \) contains a directed path from \( r \) to every other vertex in \( V \). The number of such directed spanning trees rooted at vertex 5 is
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 \(3 \times 10^8 \ 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
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 ______.
A processor X1 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 X2 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 X1 and X2. If the BPU has a prediction accuracy of 80%, the speed up (rounded off to two decimal places) obtained by X2 over X1 in executing P is ______.
Consider the queues \(Q_1\) containing four elements and \(Q_2\) containing none (shown as the Initial State in the figure). The only operations allowed on these two queues are Enqueue(\(Q\), element) and Dequeue(\(Q\)). The minimum number of Enqueue operations on \(Q_1\) required to place the elements of \(Q_1\) in \(Q_2\) in reverse order (shown as the Final State in the figure) without using any additional storage is

Consider two file systems A and B, that use contiguous allocation and linked allocation, respectively. A file of size 100 blocks is already stored in A and also in B. Now, consider inserting a new block in the middle of the file (between the 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 A and B are \(n_A\) and \(n_B\), respectively, then the value of \(n_A + n_B\) is
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, 1, 5, 6, 1 \]
The page fault rate, defined as the ratio of the number of page faults to the number of memory accesses (rounded off to one decimal place) is ______.
Consider the following grammar along with translation rules.

Here \# and % are operators and id is a token that represents an integer and \( \text{id_{val} \) represents the corresponding integer value. The set of non-terminals is \{S, T, R, P\, and a subscripted non-terminal indicates an instance of the non-terminal.
\text{Using this translation scheme, the computed value of \( S_{\text{val} \) \text{ for root of the parse tree for the expression 20\#10%5\#8%2\#2 \text{ is
Quick Links:
GATE 2022 CS Paper Analysis
GATE 2022 CS questions paper was a combination of 15 MSQs (Multiple Select Questions), 16 NATs (Numerical Answer Type), and 24 MCQs (Multiple Choice Questions).
- There were two types of questions, carrying 1 mark and 2 marks, that appeared in GATE 2022 CS question paper.
- As per the determined marking scheme, ⅓ marks and ⅔ marks were deducted for questions carrying 1 and 2 marks respectively.
- Negative marking was not applicable for wrongly attempted NATs.
| Sections/Topics | Weightage of Topics |
|---|---|
| General Aptitude | 15% |
| Algorithms | 9% |
| Data Structure and Programming | 9% |
| Computer Organization and Architecture | 8% |
| Digital Logic | 5% |
| Computer Networks | 11% |
| Theory of Computation | 10% |
| Databases | 7% |
| Compiler Design | 5% |
| Operating System | 6% |
| Discrete Mathematics | 9% |
| Engineering Mathematics | 6% |
| Total | 100% |
Follow the below-mentioned table in order to know the details of the distribution of questions as per the chapters-
| Topics/Chapters | 1 Mark Question | 2 Marks Questions | Carried Marks |
|---|---|---|---|
| Algorithms | 3 | 3 | 9 |
| Data Structures and Programming | 3 | 3 | 9 |
| Computer Organization | 2 | 3 | 8 |
| Digital Logic | 1 | 2 | 5 |
| Computer Network | 3 | 4 | 11 |
| Theory of Computation | 2 | 4 | 10 |
| Database | 3 | 2 | 7 |
| Compiler Design | 1 | 2 | 5 |
| Operating System | 2 | 2 | 6 |
| Discrete Mathematics | 3 | 3 | 9 |
| Engineering Mathematics | 2 | 2 | 6 |
| General Aptitude | 5 | 5 | 15 |
| Total | 30 | 35 | 10 |
Also Check:
GATE 2022 CS: Exam Pattern and Marking Scheme
The conducting authorities had MSQs from the year 2021. MSQs comes with one or more than one correct answers. A student had to choose all the correct answers to solve MSQs correctly. Likewise, NATs no marks would be deducted if students attempt wrong or incorrect MSQs. MSQs, MCQs and NATs constituted the GATE 2021 CY. Each question holds either 1 or 2 marks. There were a total of 65 questions holding 100 marks.
- Candidates will have to pay penalty of ⅓ and ⅔ marks for every wrong question carried 1 and 2 marks
- Marks would be deducted only for the incorrect MCQs
- The cutoff for 2021 goes up to 36.2, 32.5, and 24.1 for General, OBC, and SC/ST candidates
Also Check:
GATE Previous Year Question Papers
| GATE 2023 Question Papers | GATE 2022 Question Papers | GATE 2021 Question Papers |
| GATE 2020 Question Papers | GATE 2019 Question Papers | GATE 2018 Question Papers |
Also Check:







Comments