GATE CS 2025 (Forenoon)

65 questions · 100 marks · 180 minutes

Take this paper as a timed test
From RENYXERAWhat rank do your marks get?GATE score, likely All-India Rank and qualifying marks for your category.

GENERAL APTITUDE (GA)

  1. Q1Ravi had younger brother who taught at university. He was widely regarded as honorable man. Select the option with the correct sequence of articles to fill in the blanks.Verbal Aptitude · Basic English Grammar (Tenses, Articles, Adjectives) · MCQ · 1 mark
  2. Q2The CEO’s decision to downsize the workforce was considered myopic because it sacrificed long-term stability to accommodate short-term gains. Select the most appropriate option th…Verbal Aptitude · Vocabulary Mechanics (Antonyms, Synonyms) · MCQ · 1 mark
  3. Q3The average marks obtained by a class in an examination were calculated as 30.8. However, while checking the marks entered, the teacher found that the marks of one student were en…Quantitative Aptitude · Averages, Mixtures, and Alligations · MCQ · 1 mark
  4. Q4Consider the relationships among P, Q, R, S, and T: • P is the brother of Q. • S is the daughter of Q. • T is the sister of S. • R is the mother of Q. The following statements are…Analytical Aptitude · Analogy and Relationship Matching · MCQ · 1 mark
  5. Q5According to the map shown in the figure, which one of the following statements is correct? Note: The figure shown is representative.Quantitative Aptitude · Graphical Representations (2D and 3D Plots, Maps, Tables) · MCQ · 1 mark
  6. Q6“I put the brown paper in my pocket along with the chalks, and possibly other things. I suppose every one must have reflected how primeval and how poetical are the things that one…Verbal Aptitude · Reading Comprehension · MCQ · 2 marks
  7. Q7In the diagram, the lines QR and ST are parallel to each other. The shortest distance between these two lines is half the shortest distance between the point P and line QR. What i…Quantitative Aptitude · Mensuration and Geometry · MCQ · 2 marks
  8. Q8A 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?Quantitative Aptitude · Elementary Statistics and Probability · MCQ · 2 marks
  9. Q9A square paper, shown in figure (I), is folded along the dotted lines as shown in the figures (II) and (III). Then a few cuts are made as shown in figure (IV). Which one of the fo…Spatial Aptitude · Paper Folding and Cutting Diagnostics · MCQ · 2 marks
  10. Q10A 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 pu…Quantitative Aptitude · Combinatorics Core (Permutations, Combinations, Series) · MCQ · 2 marks

CORE CS

  1. Q11Suppose 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.…Computer Organization and Architecture (COA) · I/O Interfaces (Interrupts & DMA Control Modes) · MCQ · 1 mark
  2. Q12Which ONE of the following statements is FALSE regarding the symbol table?Compiler Design · Syntax-Directed Translation & Runtime Environments · MCQ · 1 mark
  3. Q13Which ONE of the following techniques used in compiler code optimization uses live variable analysis?Compiler Design · Data Flow Analysis: Constant Propagation, Liveliness Analysis, Common Subexpression Elimination · MCQ · 1 mark
  4. Q14Consider 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,…Operating Systems (OS) · Memory Management and Virtual Memory · MCQ · 1 mark
  5. Q15A schedule of three database transactions T 1 , T 2 , and T 3 is shown. R i(A) and W i(A) denote read and write of data item A by transaction T i , i = 1, 2, 3 . The transaction T…Database Management Systems (DBMS) · Transactions, Concurrency Control, Conflict Serializability · MCQ · 1 mark
  6. Q16Identify 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 Func…Computer Networks (CN) · OSI & TCP/IP Protocol Layers · MCQ · 1 mark
  7. Q18Let 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 1(u, v) and d 2(u, v) be the shortest dista…Algorithms · Minimum Spanning Trees (Prim/Kruskal Algorithms) · MCQ · 1 mark
  8. Q19Consider 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…Theory of Computation (TOC) · Context-Free Grammars & Push-Down Automata · MCQ · 1 mark
  9. Q20Consider 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?Algorithms · Asymptotic Analysis (O, Omega, Theta Complexities) · MCQ · 1 mark
  10. Q21Consider 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/ar…Database Management Systems (DBMS) · File Organization & Indexing (e.g., B and B+ Trees) · MSQ · 1 mark
  11. Q22Consider 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 orde…Computer Networks (CN) · Transport Layer (Flow Control and Congestion Control, TCP, UDP, Sockets) · MSQ · 1 mark
  12. Q24Let 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 ,…Digital Logic · Boolean Algebra, Minimization, K-Maps · MSQ · 1 mark
  13. Q25The 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?Digital Logic · Number Representations & Fixed/Floating Point Math · MSQ · 1 mark
  14. Q26Which of the following statement(s) is/are TRUE for any binary search tree (BST) having n distinct integers?Data Structures · Binary Search Trees (BSTs) & Binary Heaps · MSQ · 1 mark
  15. Q27A 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 dat…Computer Organization and Architecture (COA) · ALU, Control Unit Design, Data-Path Operations · MSQ · 1 mark
  16. Q28A regular language L is accepted by a non-deterministic finite automaton (NFA) with n states. Which of the following statement(s) is/are FALSE?Theory of Computation (TOC) · Regular Expressions & Finite Automata (DFA/NFA Min) · MSQ · 1 mark
  17. Q29Suppose 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 t…Operating Systems (OS) · CPU and I/O Scheduling · NAT · 1 mark
  18. Q33The pseudocode of a function fun( ) is given below: c 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,…Algorithms · Searching, Sorting, Hashing Mechanisms · NAT · 1 mark
  19. Q34c include <stdio.h> 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 . (Answ…Programming in C · Pointers, Multi-Dimensional Arrays, Structures · NAT · 1 mark
  20. Q35The 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 .…Data Structures · Binary Search Trees (BSTs) & Binary Heaps · NAT · 1 mark
  21. Q36Consider a memory system with 1 M bytes of main memory and 16 K bytes of cache memory. Assume that the processor generates 20-bit memory address, and the cache block size is 16 by…Computer Organization and Architecture (COA) · Memory Hierarchy (Direct/Associative Cache Mapping) · MCQ · 2 marks
  22. Q37A 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…Computer Organization and Architecture (COA) · Machine Instructions & Addressing Modes · MCQ · 2 marks
  23. Q38A computer has two processors, M 1 and M 2 . Four processes P 1, P 2, P 3, P 4 with CPU bursts of 20, 16, 25, and 10 milliseconds, respectively, arrive at the same time and these…Operating Systems (OS) · CPU and I/O Scheduling · MCQ · 2 marks
  24. Q39Consider 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, p…Database Management Systems (DBMS) · Relational Models, Relational Algebra, Tuple Calculus · MCQ · 2 marks
  25. Q40A 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?Computer Networks (CN) · Routing Protocols (Shortest Path, Flooding, Distance Vector, Link State Routing) · MCQ · 2 marks
  26. Q42Consider the following four variable Boolean function in sum-of-product form F(b 3, b 2, b 1, b 0) = (0, 2, 4, 8, 10, 11, 12) where the value of the function is computed by consid…Digital Logic · Boolean Algebra, Minimization, K-Maps · MCQ · 2 marks
  27. Q44Consider the following two languages over the alphabet \ a, b\ : L 1 = \ \ a, b\ + AND \ a, b\ +\ L 2 = \ \ a\ + AND \ a, b\ +\ Which ONE of the following statements is CORRECT?Theory of Computation (TOC) · Regular and Context-Free Languages & Pumping Lemma · MCQ · 2 marks
  28. Q45Consider the following two languages over the alphabet \ a, b, c\ , where m and n are natural numbers. L 1 = \ a m b m c m + n m, n 1\ L 2 = \ a m b n c m + n m, n 1\ Which ONE of…Theory of Computation (TOC) · Regular and Context-Free Languages & Pumping Lemma · MCQ · 2 marks
  29. Q46Which of the following statement(s) is/are TRUE while computing First and Follow during top down parsing by a compiler?Compiler Design · Lexical Analysis & Parsing Architectures (LL(1), LR(1), LALR) · MSQ · 2 marks
  30. Q47Consider 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)…Database Management Systems (DBMS) · Normalization Schemes (1NF, 2NF, 3NF, BCNF Boundaries) · MSQ · 2 marks
  31. Q50Consider the following deterministic finite automaton (DFA) defined over the alphabet, = \ a, b\ . Identify which of the following language(s) is/are accepted by the given DFA.Theory of Computation (TOC) · Regular Expressions & Finite Automata (DFA/NFA Min) · MSQ · 2 marks
  32. Q51A disk of size 512 M bytes is divided into blocks of 64 K bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 4 bytes to st…Operating Systems (OS) · File Systems Operations & Disk Scheduling Optimization · NAT · 2 marks
  33. Q52Refer to the given 3-address code sequence. This code sequence is split into basic blocks. The number of basic blocks is . (Answer in integer) 1001: i = 1 1002: j = 1 1003: t1 = 1…Compiler Design · Intermediate Code Generation & Local Code Optimization · NAT · 2 marks
  34. Q53A computer has a memory hierarchy consisting of two-level cache (L1 and L2) and a main memory. If the processor needs to access data from memory, it first looks into L1 cache. If…Computer Organization and Architecture (COA) · Memory Hierarchy (Direct/Associative Cache Mapping) · NAT · 2 marks
  35. Q54In optimal page replacement algorithm, information about all future page references is available to the operating system (OS). A modification of the optimal page replacement algor…Operating Systems (OS) · Memory Management and Virtual Memory · NAT · 2 marks
  36. Q55Consider the following database tables of a sports league. player(pid, pname, age) team(tid, tname, city, cid) coach(cid, cname) members(pid, tid) An instance of the table and an…Database Management Systems (DBMS) · SQL Queries (DDL/DML, Joins, Aggregations) · NAT · 2 marks
  37. Q57Suppose a message of size 15000 bytes is transmitted from a source to a destination using IPv4 protocol via two routers as shown in the figure. Each router has a defined maximum t…Computer Networks (CN) · Fragmentation and IP Addressing (IPv4, IPv6, CIDR, Basics of IP support Protocols (ARP, DHCP, ICMP), NAT) · NAT · 2 marks
  38. Q59Consider a finite state machine (FSM) with one input X and one output f , represented by the given state transition table. The minimum number of states required to realize this FS…Digital Logic · Sequential Circuits (Flip-Flops, Registers, Counters) · NAT · 2 marks
  39. Q60Consider the given sequential circuit designed using D-Flip-flops. The circuit is initialized with some value (initial state). The number of distinct states the circuit will go th…Digital Logic · Sequential Circuits (Flip-Flops, Registers, Counters) · NAT · 2 marks
  40. Q61c include <stdio.h> int foo(int S[ ], int size) if(size == 0) return 0; if(size == 1) return 1; if(S[0] != S[1]) return 1 + foo(S + 1, size - 1); return foo(S + 1, size - 1); int…Programming in C · Functions, Parameter Passing, Scope Rules, Recursion · NAT · 2 marks
  41. Q62Let LIST be a datatype for an implementation of linked list defined as follows: c typedef struct list int data; struct list next; LIST; Suppose a program has created two linked li…Data Structures · Linked Lists & Binary Trees · NAT · 2 marks
  42. Q63Consider the following C program: c include <stdio.h> int gate (int n) int d, t, newnum, turn; newnum = turn = 0; t = 1; while (n >= t) t = 10; t /=10; while (t > 0) d = n/t; n =…Programming in C · Data Types, Syntax, Control Structures, Loops · NAT · 2 marks
  43. Q64The maximum value of x such that the edge between the nodes B and C is included in every minimum spanning tree of the given graph is . (Answer in integer)Algorithms · Minimum Spanning Trees (Prim/Kruskal Algorithms) · NAT · 2 marks
  44. Q65In a double hashing scheme, h 1(k) = k 11 and h 2(k) = 1 + (k 7) are the auxiliary hash functions. The size m of the hash table is 11. The hash function for the i th probe in the…Algorithms · Searching, Sorting, Hashing Mechanisms · NAT · 2 marks

MATHEMATICAL FOUNDATIONS

  1. Q17g(.) 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) fun…Discrete Mathematics · Sets, Relations, Functions, Partial Orders, Lattices · MCQ · 1 mark
  2. Q23Consider 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 = -1Linear Algebra · Matrices, Determinants, & Linear Equation Systems · MSQ · 1 mark
  3. Q30Let 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,…Discrete Mathematics · Combinatorics (Counting Rules, Summation Formulas) · NAT · 1 mark
  4. Q31Consider the given function f(x) . f(x) = cases ax + b & for x < 1 \\ x 3 + x 2 + 1 & for x 1 cases If the function is differentiable everywhere, the value of b must be . (Rounded…Calculus · Limits, Continuity, and Differentiability · NAT · 1 mark
  5. Q32A 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 ran…Probability & Statistics · Conditional Probability & Bayes Theorem · NAT · 1 mark
  6. Q41Let A be a 2 2 matrix as given. A = bmatrix 1 & 1 \\ 1 & -1 bmatrix What are the eigenvalues of the matrix A 13 ?Linear Algebra · Eigenvalues and Eigenvectors · MCQ · 2 marks
  7. Q43Let 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 valu…Discrete Mathematics · Graph Theory (Connectivity, Paths, Cycles, Trees) · MCQ · 2 marks
  8. Q48Which 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 a…Discrete Mathematics · Propositional and First-Order Quantifier Logic · MSQ · 2 marks
  9. Q49A = 0, 1, 2, 3, ... is the set of non-negative integers. Let F be the set of functions from A to itself. For any two functions, f 1, f 2 F we define (f 1 f 2)(n) = f 1(n) + f 2(n)…Discrete Mathematics · Algebraic Structures (Monoids, Groups) · MSQ · 2 marks
  10. Q56Suppose a 5-bit message is transmitted from a source to a destination through a noisy channel. The probability that a bit of the message gets flipped during transmission is 0.01.…Probability & Statistics · Standard Distributions (Poisson, Binomial) · NAT · 2 marks
  11. Q58Consider a probability distribution given by the density function P(x) . P(x) = cases Cx 2, & for 1 x 4 \\ 0, & for x < 1 or x > 4 cases The probability that x lies between 2 and…Probability & Statistics · Continuous/Discrete Distributions (Uniform, Normal, Exponential) · NAT · 2 marks