GATE 2025 CS (CS2) – Previous Year Questions with Solutions
All 65 questions of GATE 2025 CS (CS2) with answers and explanations. Read each question, then practise it by topic or as a full paper.
Practise this paper in The GATE Grind →
- Question 1 – Despite his initial hesitation, Rehman's to contribute to the success of the project never wavered. Select the most appropriate option to complete the…
- Question 2 – Bird : Nest :: Bee : Select the correct option to complete the analogy.
- Question 3 – If Pex = Qe-x for all real values of x, which one of the following statements is true?
- Question 4 – The paper as shown in the figure is folded to make a cube where each square corresponds to a particular face of the cube. Which one of the following…
- Question 5 – 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?
- Question 6 – Based only on the conversation below, identify the logically correct inference: "Even if I had known that you were in the hospital, I would not have…
- Question 7 – If IMAGE and FIELD are coded as FHBNJ and EMFJG respectively then, which one among the given options is the most appropriate code for BEACH ?
- Question 8 – Which one of the following options is correct for the given data in the table? Iteration (i) 0 1 2 3 --- --- --- --- --- Input (I) 20 -4 10 15 Output…
- Question 9 – In the given figure, PQRS is a square of side 2 cm and PLMN is a rectangle. The corner L of the rectangle is on the side QR. Side MN of the rectangle…
- Question 10 – 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,…
- Question 11 – If A = pmatrix1 & 2\\2 & -1pmatrix, then which ONE of the following is A8 ?
- Question 12 – The value of x such that x > 1, satisfying the equation 1x t t\,dt = 14 is
- Question 13 – 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…
- Question 14 – Let L, M, and N be non-singular matrices of order 3 satisfying the equations L2 = L-1, M = L8 and N = L2. Which ONE of the following is the value of…
- Question 15 – Let P(x) be an arbitrary predicate over the domain of natural numbers. Which ONE of the following statements is TRUE?
- Question 16 – Consider the following statements: (i) Address Resolution Protocol (ARP) provides a mapping from an IP address to the corresponding hardware…
- Question 17 – Consider the routing protocols given in List I and the names given in List II: List I List II --- --- (i) Distance vector routing (a) Bellman-Ford…
- Question 18 – 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…
- Question 19 – Consider the following C program: Which ONE of the following will be the output of the program?
- Question 20 – 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…
- Question 21 – Consider the following statements about the use of backpatching in a compiler for intermediate code generation: (I) Backpatching can be used to…
- Question 22 – 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…
- Question 23 – 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…
- Question 24 – Which ONE of the following languages is accepted by a deterministic pushdown automaton?
- Question 25 – Let G 1, G 2 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…
- Question 26 – 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…
- Question 27 – An audit of a banking transactions system has found that on an earlier occasion, two joint holders of account A attempted simultaneous transfers of…
- Question 28 – Which of the following is/are part of an Instruction Set Architecture of a processor?
- Question 29 – Which of the following statements regarding Breadth First Search (BFS) and Depth First Search (DFS) on an undirected simple graph G is/are TRUE?
- Question 30 – Consider the two lists List I and List II given below: List I List II --- --- (i) Context free languages (a) Closed under union (ii) Recursive…
- Question 31 – Consider the following logic circuit diagram. [Figure: inputs X and Y feed a NAND gate, a NOT gate on X, and an AND gate taking X and Y; the three…
- Question 32 – 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…
- Question 33 – The output of the given C code segment is . (Answer in integer)
- Question 34 – 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…
- Question 35 – 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…
- Question 36 – 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…
- Question 37 – Let G be an edge-weighted undirected graph with positive edge weights. Suppose a positive constant is added to the weight of every edge. Which ONE of…
- Question 38 – 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…
- Question 39 – 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…
- Question 40 – Given a Context-Free Grammar G as follows: S Aa bAc dc bda A d Which ONE of the following statements is TRUE?
- Question 41 – 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…
- Question 42 – 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),…
- Question 43 – Given the following Karnaugh Map for a Boolean function F(w,x,y,z) (rows wx = 00, 01, 11, 10; columns yz = 00, 01, 11, 10): wx yz 00 01 11 10 --- ---…
- Question 44 – Consider a system of linear equations PX = Q where P R33 and Q R31. Suppose P has an LU decomposition, P = LU, where L = bmatrix1 & 0 & 0\ 21 & 1 & 0\…
- Question 45 – 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…
- Question 46 – 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,…
- Question 47 – Consider a demand paging system with three frames, and the following page reference string: 1 2 3 4 5 4 1 6 4 5 1 3 2. The contents of the frames are…
- Question 48 – P = \P 1, P 2, P 3, P 4\ consists of all active processes in an operating system. R = \R 1, R 2, R 3, R 4\ consists of single instances of distinct…
- Question 49 – Three floating point numbers X, Y, and Z are stored in three registers R X, R Y, and R Z, respectively in IEEE 754 single precision format as given…
- Question 50 – Which of the following Boolean algebraic equation(s) is/are CORRECT?
- Question 51 – Consider two grammars G 1 and G 2 with the production rules given below: G 1: S if\ E\ then\ S if\ E\ then\ S\ else\ S a E b G 2: S if\ E\ then\ S M M…
- Question 52 – Let = \a, b, c\. For x *, and , let \# (x) denote the number of occurrences of in x. Which one or more of the following option(s) define(s) regular…
- Question 53 – Consider the database transactions T1 and T2, and data items X and Y. Which of the schedule(s) is/are conflict serializable? Transaction T1: R1(X),…
- Question 54 – Consider the following relational schema: Students (rollno: integer, name: string, age: integer, cgpa: real) Courses (courseno: integer, cname:…
- Question 55 – Given a computing system with two levels of cache (L1 and L2) and a main memory. The first level (L1) cache access time is 1 nanosecond (ns) and the…
- Question 56 – A 5-stage instruction pipeline has stage delays of 180, 250, 150, 170, and 250, respectively, in nanoseconds. The delay of an inter-stage latch is 10…
- Question 57 – In a B+-tree where each node can hold at most four key values, a root to leaf path consists of the following nodes: A = (49, 77, 83, -), B = (7, 19,…
- Question 58 – A computer system supports a logical address space of 232 bytes. It uses two-level hierarchical paging with a page size of 4096 bytes. A logical…
- Question 59 – Consider the following algorithm someAlgo that takes an undirected graph G as input. someAlgo(G) 1. Let v be any vertex in G. Run BFS on G starting at…
- Question 60 – Let = \1,2,3,4\. For x *, let prod(x) be the product of symbols in x modulo 7. We take prod() = 1, where is the null string. For example, prod(124) =…
- Question 61 – An application executes 6.4 108 number of instructions in 6.3 seconds. There are four types of instructions, the details of which are given in the…
- Question 62 – Consider the following C program: The output of the above program is . (Answer in integer)
- Question 63 – Consider the following C program: The output of the given C program is . (Answer in integer)
- Question 64 – A quadratic polynomial (x - )(x - ) over complex numbers is said to be square invariant if (x - )(x - ) = (x - 2)(x - 2). Suppose from the set of all…
- Question 65 – The unit interval (0,1) is divided at a point chosen uniformly distributed over (0,1) in R into two disjoint subintervals. The expected length of the…