Skip to content
Early access — you're among the first to try PYQLabs. Share feedback

GATE CSE & IT

2,749 questions · 40 years · 20 subjects

Public preview: use this branch page to find high-signal topics and keyed questions. Explanations are being added selectively, starting with recent and recurring concepts.

Worked PYQ examples

Open a few full study-layer explanations before signing in.

Browse explained PYQs →

High-yield topics

All trends →

Practice CSE & IT PYQs

80 questions shown in Computer Science. Filter for cleaner practice sessions.

Showing Computer Science PYQs from CSE & IT.
2025 Q3

If $Pe^x = Qe^{-x}$ for all real values of $x$, which one of the following statements is true?

Computer Science/MCQ/answer key
2025 Q5

Let $p_1$ and $p_2$ denote two arbitrary prime numbers. Which one of the following statements is correct for all values of $p_1$ and $p_2$?

Computer Science/MCQ/answer key
2025 Q8

Which one of the following options is correct for the given data in the table?

Computer Science/MCQ/answer key
2025 Q8

A fair six-faced dice, with the faces labelled '1', '2', '3', '4', '5', and '6', is rolled thrice. What is the probability of rolling '6' exactly once?

Computer Science/MCQ/answer key
2025 Q10

The diagram below shows a river system consisting of 7 segments, marked P, Q, R, S, T, U, and V. It splits the land into 5 zones, marked Z1, Z2, Z3, Z4, and Z5. We need to connect...

Computer Science/DIAGRAM/answer key
2025 Q10

A shop has 4 distinct flavors of ice-cream. One can purchase any number of scoops of any flavor. The order in which the scoops are purchased is inconsequential. If one wants to pur...

Computer Science/MCQ/answer key
2025 Q11

If A = $\begin{pmatrix} 1 & 2 \ -2 & -1 \end{pmatrix}$, then which ONE of the following is A⁸ ?

Computer Science/MCQ/answer key
2025 Q11

Suppose a program is running on a non-pipelined single processor computer system. The computer is connected to an external device that can interrupt the processor asynchronously. T...

Computer Science/MCQ/answer key
2025 Q12

The value of x such that x > 1, satisfying the equation $\int_{1}^{x} t \ln t \, dt = \frac{1}{4}$ is

Computer Science/MCQ/answer key
2025 Q12

Which ONE of the following statements is FALSE regarding the symbol table?

Computer Science/MCQ/answer key
2025 Q13

Consider a binary tree T in which every node has either zero or two children. Let n > 0 be the number of nodes in T. Which ONE of the following is the number of nodes in T that hav...

Computer Science/MCQ/answer key
2025 Q13

Which ONE of the following techniques used in compiler code optimization uses live variable analysis?

Computer Science/MCQ/answer key
2025 Q14

Let L, M, and N be non-singular matrices of order 3 satisfying the equations L^2 = L^-1, M = L^8 and N = L^2. Which ONE of the following is the value of the determinant of (M - N)?

Computer Science/MCQ/answer key
2025 Q14

Consider a demand paging memory management system with 32-bit logical address, 20-bit physical address, and page size of 2048 bytes. Assuming that the memory is byte addressable, w...

Computer Science/MCQ/answer key
2025 Q15

Let P(x) be an arbitrary predicate over the domain of natural numbers. Which ONE of the following statements is TRUE?

Computer Science/MCQ/answer key
2025 Q15

A schedule of three database transactions T1, T2, and T3 is shown. Ri(A) and Wi(A) denote read and write of data item A by transaction Ti, i = 1,2,3. The transaction T1 aborts at t...

Computer Science/MCQ/answer key
2025 Q16

Identify the ONE CORRECT matching between the OSI layers and their corresponding functionalities as shown. OSI Layers (a) Network layer (b) Transport layer (c) Datalink layer Funct...

Computer Science/MCQ/answer key
2025 Q16

Consider the following statements: (i) Address Resolution Protocol (ARP) provides a mapping from an IP address to the corresponding hardware (link-layer) address. (ii) A single TCP...

Computer Science/STMT/answer key
2025 Q17

Consider the routing protocols given in List I and the names given in List II: List I (i) Distance vector routing (ii) Link state routing List II (a) Bellman-Ford (b) Dijkstra For...

Computer Science/MCQ/answer key
2025 Q17

g(.) is a function from A to B, f(.) is a function from B to C, and their composition defined as f(g(.)) is a mapping from A to C. If f(.) and f(g(.)) are onto (surjective) functio...

Computer Science/MCQ/answer key
2025 Q18

Let G be any undirected graph with positive edge weights, and T be a minimum spanning tree of G. For any two vertices, u and v, let d₁(u, v) and d₂(u, v) be the shortest distances...

Computer Science/MCQ/answer key
2025 Q18

A machine receives an IPv4 datagram. The protocol field of the IPv4 header has the protocol number of a protocol X. Which ONE of the following is NOT a possible candidate for X?

Computer Science/MCQ/answer key
2025 Q19

Consider the following C program: #include void stringcopy (char *, char *); int main() { char a [30] = "@#Hello World!"; stringcopy (a, a + 2); printf("%s\n", a); return 0; } void...

Computer Science/MCQ/answer key
2025 Q19

Consider the following context-free grammar G, where S, A, and B are the variables (non-terminals), a and b are the terminal symbols, S is the start variable, and the rules of G ar...

Computer Science/MCQ/answer key
2025 Q20

Consider the following recurrence relation: T(n) = 2T(n - 1) + n2^n for n > 0, T(0) = 1. Which ONE of the following options is CORRECT?

Computer Science/MCQ/answer key
2025 Q20

Consider an unordered list of N distinct integers. What is the minimum number of element comparisons required to find an integer in the list that is NOT the largest in the list?

Computer Science/MCQ/answer key
2025 Q21

Consider the following B+ tree with 5 nodes, in which a node can store at most 3 key values. The value 23 is now inserted in the B+ tree. Which of the following options(s) is/are C...

Computer Science/MCQ/answer key
2025 Q21

Consider the following statements about the use of backpatching in a compiler for intermediate code generation: (I) Backpatching can be used to generate code for Boolean expression...

Computer Science/STMT/answer key
2025 Q22

Consider the 3-way handshaking protocol for TCP connection establishment. Let the three packets exchanged during the connection establishment be denoted as P1, P2, and P3, in order...

Computer Science/MCQ/answer key
2025 Q22

Given the following syntax directed translation rules: Rule 1: R → AB {B.i = R.i - 1; A.i = B.i; R.i = A.i + 1; } Rule 2: P → CD {P.i = C.i + D.i; D.i = C.i + 2; } Rule 3: Q → EF {...

Computer Science/MCQ/answer key
2025 Q23

Consider a network that uses Ethernet and IPv4. Assume that IPv4 headers do not use any options field. Each Ethernet frame can carry a maximum of 1500 bytes in its data field. A UD...

Computer Science/MCQ/answer key
2025 Q23

Consider the given system of linear equations for variables x and y, where k is a real-valued constant. Which of the following option(s) is/are CORRECT? x + ky = 1 kx + y = -1

Computer Science/MCQ/answer key
2025 Q24

Let X be a 3-variable Boolean function that produces output as '1' when at least two of the input variables are '1'. Which of the following statement(s) is/are CORRECT, where a, b,...

Computer Science/MCQ/answer key
2025 Q24

Which ONE of the following languages is accepted by a deterministic pushdown automaton?

Computer Science/MCQ/answer key
2025 Q25

Let G1, G2 be Context Free Grammars (CFGs) and R be a regular expression. For a grammar G, let L(G) denote the language generated by G. Which ONE among the following questions is d...

Computer Science/MCQ/answer key
2025 Q25

The number -6 can be represented as 1010 in 4-bit 2's complement representation. Which of the following is/are CORRECT 2's complement representation(s) of -6?

Computer Science/MCQ/answer key
2025 Q26

Which of the following statement(s) is/are TRUE for any binary search tree (BST) having n distinct integers?

Computer Science/MCQ/answer key
2025 Q26

Processes P1, P2, P3, P4 arrive in that order at times 0, 1, 2, and 8 milliseconds respectively, and have execution times of 10, 13, 6, and 9 milliseconds respectively. Shortest Re...

Computer Science/MCQ/answer key
2025 Q27

An audit of a banking transactions system has found that on an earlier occasion, two joint holders of account A attempted simultaneous transfers of Rs. 10000 each from account A to...

Computer Science/MCQ/answer key
2025 Q27

A partial data path of a processor is given in the figure, where RA, RB, and RZ are 32-bit registers. Which option(s) is/are CORRECT related to arithmetic operations using the data...

Computer Science/MCQ/answer key
2025 Q28

Which of the following is/are part of an Instruction Set Architecture of a processor?

Computer Science/MCQ/answer key
2025 Q28

A regular language L is accepted by a non-deterministic finite automaton (NFA) with n states. Which of the following statement(s) is/are FALSE?

Computer Science/MCQ/answer key
2025 Q29

Which of the following statements regarding Breadth First Search (BFS) and Depth First Search (DFS) on an undirected simple graph G is/are TRUE?

Computer Science/MCQ/answer key
2025 Q29

Suppose in a multiprogramming environment, the following C program segment is executed. A process goes into I/O queue whenever an I/O related operation is performed. Assume that th...

Computer Science/NAT/answer key
2025 Q30

Consider the two lists List I and List II given below: List I (i) Context free languages (ii) Recursive languages (iii) Regular languages List II (a) Closed under union (b) Not clo...

Computer Science/MTF/answer key
2025 Q30

Let S be the set of all ternary strings defined over the alphabet {a, b, c}. Consider all strings in S that contain at least one occurrence of two consecutive symbols, that is, "aa...

Computer Science/NAT/answer key
2025 Q31

Consider the following logic circuit diagram. Which is/are the CORRECT option(s) for the output function F?

Computer Science/MCQ/answer key
2025 Q32

The following two signed 2's complement numbers (multiplicand M and multiplier Q) are being multiplied using Booth's algorithm: M: 1100 1101 1110 1101 and Q: 1010 0100 1010 1010 Th...

Computer Science/NAT/answer key
2025 Q32

A box contains 5 coins: 4 regular coins and 1 fake coin. When a regular coin is tossed, the probability P(head) = 0.5 and for a fake coin, P(head) = 1. You pick a coin at random an...

Computer Science/NAT/answer key
2025 Q33

int x=126,y=105; do { if (x>y) x=x-y; else y=y-x; } while(x!=y); printf("%d",x); The output of the given C code segment is __________. (Answer in integer)

Computer Science/NAT/answer key
2025 Q33

The pseudocode of a function fun () is given below: fun(int A[0,...,n-1]){ for i=0 to n-2 for j=0 to n-i-2 if (A[j]>A[j+1]) then swap A[j] and A[j+1] } Let A[0, ...,29] be an array...

Computer Science/NAT/answer key
2025 Q34

#include void foo(int *p, int x) { *p=x; } int main() { int *z; int a = 20, b = 25; z = &a; foo(z,b); printf("%d",a); return 0; } The output of the given C program is __________. (...

Computer Science/NAT/answer key
2025 Q34

In a 4-bit ripple counter, if the period of the waveform at the last flip-flop is 64 microseconds, then the frequency of the ripple counter in kHz is __________. (Answer in integer...

Computer Science/NAT/answer key
2025 Q35

The height of any rooted tree is defined as the maximum number of edges in the path from the root node to any leaf node. Suppose a Min-Heap T stores 32 keys. The height of T is ___...

Computer Science/NAT/answer key
2025 Q35

Suppose the values 10, -4, 15, 30, 20, 5, 60, 19 are inserted in that order into an initially empty binary search tree. Let T be the resulting binary search tree. The number of edg...

Computer Science/NAT/answer key
2025 Q36

Suppose we are transmitting frames between two nodes using Stop-and-Wait protocol. The frame size is 3000 bits. The transmission rate of the channel is 2000 bps (bits/second) and t...

Computer Science/MCQ/answer key
2025 Q36

Consider a memory system with 1M bytes of main memory and 16K bytes of cache memory. Assume that the processor generates 20-bit memory address, and the cache block size is 16 bytes...

Computer Science/MCQ/answer key
2025 Q37

A processor has 64 general-purpose registers and 50 distinct instruction types. An instruction is encoded in 32-bits. What is the maximum number of bits that can be used to store t...

Computer Science/MCQ/answer key
2025 Q37

Let G be an edge-weighted undirected graph with positive edge weights. Suppose a positive constant $\alpha$ is added to the weight of every edge. Which ONE of the following stateme...

Computer Science/MCQ/answer key
2025 Q38

A computer has two processors, M₁ and M₂. Four processes P₁, P₂, P₃, P₄ with CPU bursts of 20, 16, 25, and 10 milliseconds, respectively, arrive at the same time and these are the...

Computer Science/MCQ/answer key
2025 Q38

A meld operation on two instances of a data structure combines them into one single instance of the same data structure. Consider the following data structures: P: Unsorted doubly...

Computer Science/MCQ/answer key
2025 Q39

Consider two relations describing teams and players in a sports league: * teams (tid, tname): tid, tname are team-id and team-name, respectively * players(pid, pname, tid): pid, pn...

Computer Science/MCQ/answer key
2025 Q39

For a direct-mapped cache, 4 bits are used for the tag field and 12 bits are used to index into a cache block. The size of each cache block is one byte. Assume that there is no oth...

Computer Science/MCQ/answer key
2025 Q40

A packet with the destination IP address 145.36.109.70 arrives at a router whose routing table is shown. Which interface will the packet be forwarded to? Subnet Address Subnet Mask...

Computer Science/MCQ/answer key
2025 Q40

Given a Context-Free Grammar G as follows: S→Aa | bAc | dc | bda A→d Which ONE of the following statements is TRUE?

Computer Science/MCQ/answer key
2025 Q41

Let A be a 2 x 2 matrix as given. $A = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}$ What are the eigenvalues of the matrix $A^{13}$ ?

Computer Science/MCQ/answer key
2025 Q41

An array A of length n with distinct elements is said to be bitonic if there is an index 1 ≤ i ≤ n such that A[1..i] is sorted in the non-decreasing order and A[i + 1..n] is sorted...

Computer Science/MCQ/answer key
2025 Q42

Consider the following four variable Boolean function in sum-of-product form $F(b_3, b_2, b_1, b_0) = \Sigma(0, 2, 4, 8, 10, 11, 12)$. where the value of the function is computed b...

Computer Science/MCQ/answer key
2025 Q42

Let F be the set of all functions from {1,..., n} to {0,1}. Define the binary relation ≤ on F as follows: ∀f,g∈F, f≤ g if and only if ∀x ∈ {1, ..., n}, f(x) ≤ g(x), where 0 ≤ 1. Wh...

Computer Science/MCQ/answer key
2025 Q43

Let G(V, E) be an undirected and unweighted graph with 100 vertices. Let d(u, v) denote the number of edges in a shortest path between vertices u and v in V. Let the maximum value...

Computer Science/MCQ/answer key
2025 Q43

Given the following Karnaugh Map for a Boolean function F(w,x, y, z): Which one or more of the following Boolean expression(s) represent(s) F?

Computer Science/MCQ/answer key
2025 Q44

Consider the following two languages over the alphabet {a, b}: L₁ = { αβα |α ∈ {a,b}+ AND β∈ {a,b}+ } L₂ = {αβα|α ∈ {a}+ AND β∈ {a,b}+ } Which ONE of the following statements is CO...

Computer Science/MCQ/answer key
2025 Q44

Consider a system of linear equations $PX = Q$ where $P \in \mathbb{R}^{3 \times 3}$ and $Q \in \mathbb{R}^{3 \times 1}$. Suppose $P$ has an LU decomposition, $P = LU$, where $L =...

Computer Science/MCQ/answer key
2025 Q45

Consider a stack data structure into which we can PUSH and POP records. Assume that each record pushed in the stack has a positive integer key and that all keys are distinct. We wi...

Computer Science/MCQ/answer key
2025 Q45

Consider the following two languages over the alphabet {a, b, c}, where m and n are natural numbers. L₁ = {a^m b^m c^(m+n) | m, n ≥ 1} L₂ = {a^m b^n c^(m+n) | m, n ≥ 1} Which ONE o...

Computer Science/MCQ/answer key
2025 Q46

Which of the following statement(s) is/are TRUE while computing First and Follow during top down parsing by a compiler?

Computer Science/MCQ/answer key
2025 Q46

Consider the following relational schema along with all the functional dependencies that hold on them. R1(A, B, C, D, E): { D → E, EA → B, EB → C} R2(A, B, C, D): { A → D, A → B, C...

Computer Science/MCQ/answer key
2025 Q47

Consider a relational schema team (name, city, owner), with functional dependencies {name → city, name → owner}. The relation team is decomposed into two relations, t1(name, city)...

Computer Science/MCQ/answer key
2025 Q47

Consider a demand paging system with three frames, and the following page reference string: 123454164513 2. The contents of the frames are as follows initially and after each refer...

Computer Science/MCQ/answer key
2025 Q48

Which of the following predicate logic formulae/formula is/are CORRECT representation(s) of the statement: "Everyone has exactly one mother"? The meanings of the predicates used ar...

Computer Science/MCQ/answer key