GATE 2024 CS (CS1) – Previous Year Questions with Solutions
All 65 questions of GATE 2024 CS (CS1) with answers and explanations. Read each question, then practise it by topic or as a full paper.
65 questions worth 100 marks in all (30 1-mark, 35 2-mark). Subjects covered: General Aptitude (10), Engineering Mathematics (10), Computer Organization and Architecture (6), Computer Networks (6), Databases (6), Programming and Data Structures (5), Operating System (5), Compiler Design (5).
Practise this paper in The GATE Grind →
- Question 1 – If '→' denotes increasing order of intensity, then the meaning of the words [dry → arid → parched] is analogous to [diet → fast → ]. Which one of the…
- Question 2 – If two distinct non-zero real variables x and y are such that (x+y) is proportional to (x-y) then the value of xy
- Question 3 – Consider the following sample of numbers: 9, 18, 11, 14, 15, 17, 10, 69, 11, 13. The median of the sample is
- Question 4 – The number of coins of ₹1, ₹5, and ₹10 denominations that a person has are in the ratio 5:3:13. Of the total amount, the percentage of money in ₹5…
- Question 5 – For positive non-zero real variables p and q, if (p2+q2)= p+ q+2 3, then the value of p4+q4p2q2 is
- Question 6 – In the given text, the blanks are numbered (i)−(iv). Select the best match for all the blanks. Steve was advised to keep his head (i) before heading…
- Question 7 – A rectangular paper sheet of dimensions 54 cm × 4 cm is taken. The two longer edges of the sheet are joined together to create a cylindrical tube. A…
- Question 8 – The pie chart presents the percentage contribution of different macronutrients to a typical 2,000 kcal diet of a person (Carbohydrates 35%, Proteins…
- Question 9 – A rectangular paper of 20 cm × 8 cm is folded 3 times. Each fold is made along the line of symmetry, which is perpendicular to its long edge. The…
- Question 10 – The least number of squares to be added in the figure to make AB a line of symmetry is
- Question 11 – Let f:RR be a function such that f(x)=\x,x3\, xR, where R is the set of all real numbers. The set of all points where f(x) is NOT differentiable is
- Question 12 – The product of all eigenvalues of the matrix bmatrix1&2&3\\4&5&6\\7&8&9bmatrix is
- Question 13 – Consider a system that uses 5 bits for representing signed integers in 2's complement format. In this system, two integers A and B are represented as…
- Question 14 – Consider a permutation sampled uniformly at random from the set of all permutations of \1,2,3,,n\ for some n 4. Let X be the event that 1 occurs…
- Question 15 – Which one of the following statements is FALSE?
- Question 16 – A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage. The webpage…
- Question 17 – Given an integer array of size N, we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem…
- Question 18 – Consider the following C program: Which one of the following statements is CORRECT?
- Question 19 – Consider the following C program: Assume that the input to the program from the command line is 1234 followed by a newline character. Which one of the…
- Question 20 – Let S be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students."…
- Question 21 – In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?
- Question 22 – Which of the following statements about a relation R in first normal form (1NF) is/are TRUE?
- Question 23 – Let L 1,L 2 be two regular languages and L 3 a language which is not regular. Which of the following statements is/are always TRUE?
- Question 24 – Which of the following statements about threads is/are TRUE?
- Question 25 – Which of the following process state transitions is/are NOT possible?
- Question 26 – Which of the following is/are Bottom-Up Parser(s)?
- Question 27 – Let A and B be two events in a probability space with P(A)=0.3, P(B)=0.5, and P(A B)=0.1. Which of the following statements is/are TRUE?
- Question 28 – Consider the circuit shown below where the gates may have propagation delays. Assume that all signal transitions occur instantaneously and that wires…
- Question 29 – TCP client P successfully establishes a connection to TCP server Q. Let N P denote the sequence number in the SYN sent from P to Q. Let N Q denote the…
- Question 30 – Consider a 5-stage pipelined processor with Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback…
- Question 31 – Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal…
- Question 32 – Let A and B be non-empty finite sets such that there exist one-to-one and onto functions (i) from A to B and (ii) from A A to A B. The number of…
- Question 33 – Consider the operator precedence and associativity rules for the integer arithmetic operators given in the table: + (Highest, Left), - (High, Right),…
- Question 34 – The number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is
- Question 35 – Consider two relations R(A,B) with tuples (10,20),(20,30),(30,40),(30,50),(50,95) and S(A,C) with tuples (10,90),(30,45),(40,80). The total number of…
- Question 36 – Consider a network path P—Q—R via router Q. Node P sends a file of size 106 bytes to R by splitting it into chunks of 103 bytes each, sent…
- Question 37 – Consider the SDD: S→DHTU S.val=D.val+H.val+T.val+U.val; D→"M"D1 D.val=5+D1.val; D→ε D.val=−5; H→"L"H1 H.val=5*10+H1.val; H→ε H.val=−10; T→"C"T1…
- Question 38 – Consider grammar G with start symbol S: S→daT (1); T→aS bT (2); R→(3) ε. Terminals are a,b,c,d,f. FIRST(S)=c,d,f, FIRST(T)=a,b,ε, FIRST(R)=c,ε;…
- Question 39 – Consider the pseudo-code with lines L1: t1=−1; L2: t2=0; L3: t3=0; L4: t4=4*t3; L5: t5=4*t2; L6: t6=t5*M; L7: t7=t4+t6; L8: t8=a[t7]; L9: if t8<=max…
- Question 40 – Two threads T1 (a=a+1; b=b+1;) and T2 (b=2*b; a=2*a;) update shared variables a and b, initially a=b=1. Each statement is atomic. Which option lists…
- Question 41 – An array [82, 101, 90, 11, 111, 75, 33, 131, 44, 93] is heapified. Which one of the following options represents the first three elements in the…
- Question 42 – Consider the recurrence T(n)=n\,T(n)+n for n 1... with T(1)=1. Which one of the following options is CORRECT?
- Question 43 – Consider a binary min-heap containing 105 distinct elements. Let k be the index (in the underlying array) of the maximum element stored in the heap.…
- Question 44 – The symbol → indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?
- Question 45 – Let G be a directed graph and T a depth first search (DFS) spanning tree in G rooted at a vertex v. Suppose T is also a breadth first search (BFS)…
- Question 46 – Consider the read-write schedule S over three transactions T 1,T 2,T 3: S: r 1(z); w 1(z); r 2(x); r 3(y); w 3(y); r 2(y); w 2(x); w 2(y);. Which of…
- Question 47 – Consider a Boolean expression given by F(X,Y,Z)=(3,5,6,7). Which of the following statements is/are CORRECT?
- Question 48 – Consider the C function: Which of the following statements is/are TRUE about the above function?
- Question 49 – Let A be any n m matrix, where m>n. Which of the following statements is/are TRUE about the system of linear equations Ax=0?
- Question 50 – Consider the 5-state DFA M accepting the language L(M)(0+1)* shown in the figure (start/accepting state 1; 1-0->2, 2-0->3, 3-0->1, 2-1->1, 3-1->2,…
- Question 51 – The chromatic number of a graph is the minimum number of colours used in a proper colouring of the graph. Let G be any graph with n vertices and…
- Question 52 – Consider the operators and defined by a b=a+2b, a b=ab, for positive integers. Which of the following statements is/are TRUE?
- Question 53 – Consider two set-associative cache architectures: WBC (write back policy) and WTC (write through policy). Both use LRU replacement. The cache is…
- Question 54 – Consider a 512 GB hard disk with 32 storage surfaces. There are 4096 sectors per track and each sector holds 1024 bytes of data. The number of…
- Question 55 – The baseline execution time of a program on a 2 GHz single core machine is 100 ns. The code corresponding to 90% of the execution time can be fully…
- Question 56 – A given program has 25% load/store instructions. The ideal CPI without memory stalls is 2. The program exhibits 2% miss rate on instruction cache and…
- Question 57 – Consider the code: The total number of times the printf statement is executed is
- Question 58 – A router has forwarding entries: 10.1.1.0/24→R1, 10.1.1.128/25→R2, 10.1.1.64/26→R3, 10.1.1.192/26→R4. The router forwards 20 packets each to 5 hosts…
- Question 59 – Let G=(V,,S,P) be a context-free grammar in Chomsky Normal Form with =\a,b,c\ and V containing 10 variable symbols including the start symbol S. The…
- Question 60 – The number of edges present in the forest generated by the DFS traversal of an undirected graph G with 100 vertices is 40. The number of connected…
- Question 61 – Consider the two regular expressions over the alphabet \0,1\: r=0*+1* and s=01*+10*. The total number of strings of length less than or equal to 5,…
- Question 62 – Consider a memory management system that uses a page size of 2 KB. Assume that both the physical and virtual addresses start from 0. Pages 0, 1, 2,…
- Question 63 – A bag contains 10 red balls and 15 blue balls. Two balls are drawn randomly without replacement. Given that the first ball drawn is red, the…
- Question 64 – Consider three 2-to-1 multiplexers M1, M2, M3. X1 and X2 are inputs of M1, X3 and X4 are inputs of M2, and A, B, C are the select lines of M1, M2, M3…
- Question 65 – Consider sending an IP datagram of size 1420 bytes (including 20 bytes of IP header) from a sender to a receiver over a path of two links with a…