GATE 2023 CS – Previous Year Questions with Solutions
All 65 questions of GATE 2023 CS 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 – We reached the station late, and missed the train.
- Question 2 – Kind : : : Often : Frequently (By word meaning)
- Question 3 – A series of natural numbers F 1, F 2, F 3, F 4, F 5, F 6, F 7, obeys F n+1 = F n + F n-1 for all integers n 2. If F 6 = 37, and F 7 = 60, then what is…
- Question 4 – A survey for a certain year found that 90% of pregnant women received medical care at least once before giving birth. Of these women, 60% received…
- Question 5 – Looking at the surface of a smooth 3-dimensional object from the outside, which one of the following options is TRUE?
- Question 6 – The country of Zombieland is in distress since more than 75% of its working population is suffering from serious health issues. Studies conducted by…
- Question 7 – Consider two functions of time (t), f(t) = 0.01\,t2 and g(t) = 4\,t where 0 < t < . Now consider the following two statements: (i) For some t > 0,…
- Question 8 – Which one of the following sentence sequences creates a coherent narrative? (i) Once on the terrace, on her way to her small room in the corner, she…
- Question 9 – f(x) and g(y) are functions of x and y, respectively, and f(x) = g(y) for all real values of x and y. Which one of the following options is…
- Question 10 – Which one of the options best describes the transformation of the 2-dimensional figure P to Q, and then to R, as shown?
- Question 11 – Consider the following statements regarding the front-end and back-end of a compiler. S1: The front-end includes phases that are independent of the…
- Question 12 – Which one of the following sequences when stored in an array at locations A[1],...,A[10] forms a max-heap?
- Question 13 – Let SLLdel be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let…
- Question 14 – Consider the Deterministic Finite-state Automaton (DFA) A shown below. The DFA runs on the alphabet 0, 1, and has the set of states s, p, q, r, with s…
- Question 15 – The Lucas sequence L n is defined by the recurrence relation: L n = L n-1 + L n-2, for n 3, with L 1 = 1 and L 2 = 3. Which one of the options given…
- Question 16 – Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?
- Question 17 – Suppose two hosts are connected by a point-to-point link and they are configured to use Stop-and-Wait protocol for reliable data transfer. Identify in…
- Question 18 – Let A=bmatrix1&2&3&4\\4&1&2&3\\3&4&1&2\\2&3&4&1bmatrix and B=bmatrix3&4&1&2\\4&1&2&3\\1&2&3&4\\2&3&4&1bmatrix. Let det(A) and det(B) denote the…
- Question 19 – Consider the following definition of a lexical token id for an identifier in a programming language, using extended regular expressions: letter →…
- Question 20 – An algorithm has to store several keys generated by an adversary in a hash table. The adversary is malicious who tries to maximize the number of…
- Question 21 – The output of a 2-input multiplexer is connected back to one of its inputs as shown in the figure. [Figure: 2-input MUX with inputs 0 and 1, select S,…
- Question 22 – Which one or more of the following need to be saved on a context switch from one thread (T1) of a process to another thread (T2) of the same process?
- Question 23 – Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?
- Question 24 – Which of the following statements is/are CORRECT?
- Question 25 – Which of the following statements is/are INCORRECT about the OSPF (Open Shortest Path First) routing protocol used in the Internet?
- Question 26 – Geetha has a conjecture about integers, which is of the form x\,[P(x) y\, Q(x,y)], where P is a statement about integers, and Q is a statement about…
- Question 27 – Which one or more of the following CPU scheduling algorithms can potentially cause starvation?
- Question 28 – Let f(x) = x3 + 15x2 - 33x - 36 be a real-valued function. Which of the following statements is/are TRUE?
- Question 29 – Let f and g be functions of natural numbers given by f(n) = n and g(n) = n2. Which of the following statements is/are TRUE?
- Question 30 – Let A be the adjacency matrix of the graph with vertices 1, 2, 3, 4, 5. [Figure: a graph on vertices 1-5.] Let 1, 2, 3, 4, 5 be the five eigenvalues…
- Question 31 – The value of the definite integral -33 -22 -11(4x2y - z3)dz\,dy\,dx is . (Rounded off to the nearest integer)
- Question 32 – A particular number is written as 132 in radix-4 representation. The same number in radix-5 representation is .
- Question 33 – Consider a 3-stage pipelined processor having a delay of 10 ns (nanoseconds), 20 ns, and 14 ns, for the first, second, and the third stages,…
- Question 34 – A keyboard connected to a computer is used at a rate of 1 keystroke per second. The computer system polls the keyboard every 10 ms (milli seconds) to…
- Question 35 – The integer value printed by the ANSI-C program given below is .
- Question 36 – Consider the following program: Which one of the following options represents the activation tree corresponding to the main function?
- Question 37 – Consider the control flow graph shown. [Figure: ENTRY → B1 (i = m − 1; j = n; a = 10) → B2 (i = i + 1; j = j − 1); B3 (i = a + 1); B4 (a = 20); EXIT.]…
- Question 38 – Consider the two functions incr and decr shown below. There are 5 threads each invoking incr once, and 3 threads each invoking decr once, on the same…
- Question 39 – Consider the context-free grammar G below: S → aSb X; X → aX Xb a b, where S and X are non-terminals, and a and b are terminal symbols. The starting…
- Question 40 – Consider the pushdown automaton (PDA) P below, which runs on the input alphabet a, b, has stack alphabet ⊥, A, and has three states s, p, q, with s…
- Question 41 – Consider the given C-code and its corresponding assembly code, with a few operands U1–U4 being unknown. The memory is byte-addressable. Which one of…
- Question 42 – A 4 kilobyte (KB) byte-addressable memory is realized using four 1 KB memory blocks. Two input address lines (IA4 and IA3) are connected to the chip…
- Question 43 – Consider a sequential digital circuit consisting of T flip-flops and D flip-flops as shown in the figure. CLKIN is the clock input to the circuit. At…
- Question 44 – A Boolean digital circuit is composed using two 4-input multiplexers (M1 and M2) and one 2-input multiplexer (M3) as shown in the figure. X0–X7 are…
- Question 45 – Consider the IEEE-754 single precision floating point numbers P=0xC1800000 and Q=0x3F5C2EF4. Which one of the following corresponds to the product of…
- Question 46 – Let A be a priority queue for maintaining a set of elements. Suppose A is implemented using a max-heap data structure. The operation Extract-Max(A)…
- Question 47 – Consider the C function foo and the binary tree shown. [Figure: binary tree with root 10; left child 5 with children 3 and 8; right child 11 with…
- Question 48 – Let U = \1, 2, , n\, where n is a large positive integer greater than 1000. Let k be a positive integer less than n. Let A, B be subsets of U with A =…
- Question 49 – Let f: A B be an onto (or surjective) function, where A and B are nonempty sets. Define an equivalence relation on the set A as a 1 a 2 if f(a 1) =…
- Question 50 – Suppose you are asked to design a new reliable byte-stream transport protocol like TCP. This protocol, named myTCP, runs over a 100 Mbps network with…
- Question 51 – Let X be a set and 2X denote the powerset of X. Define a binary operation on 2X as follows: A B = (A - B) (B - A). Let H = (2X, ). Which of the…
- Question 52 – Suppose in a web browser, you click on the www.gate-2023.in URL. The browser cache is empty. The IP address for this URL is not cached in your local…
- Question 53 – Consider a random experiment where two fair coins are tossed. Let A be the event that denotes HEAD on both the throws, B be the event that denotes…
- Question 54 – Consider functions Function 1 and Function 2 expressed in pseudocode as follows: Let f 1(n) and f 2(n) denote the number of times the statement "x = x…
- Question 55 – Let G be a simple, finite, undirected graph with vertex set \v 1,,v n\. Let (G) denote the maximum degree of G and let N = \1, 2, \ denote the set of…
- Question 56 – Let U = \1, 2, 3\. Let 2U denote the powerset of U. Consider an undirected graph G whose vertex set is 2U. For any A, B 2U, (A, B) is an edge in G if…
- Question 57 – Consider the following two-dimensional array D in the C programming language, which is stored in row-major order: int D[128][128]; Demand paging is…
- Question 58 – Consider a computer system with 57-bit virtual addressing using multi-level tree-structured page tables with L levels for virtual to physical address…
- Question 59 – Consider a sequence a of elements a 0 = 1, a 1 = 5, a 2 = 7, a 3 = 8, a 4 = 9, and a 5 = 2. The following operations are performed on a stack S and a…
- Question 60 – Consider the syntax directed translation given by the following grammar and semantic rules. Here N, I, F and B are non-terminals. N is the starting…
- Question 61 – Consider the following table named Student in a relational database. The primary key of this table is rollNum. Student(rollNum, name, gender, marks):…
- Question 62 – Consider a database of fixed-length records, stored as an ordered file. The database has 25,000 records, with each record being 100 bytes, of which…
- Question 63 – Consider the language L over the alphabet 0, 1, given below: L = \w \0,1\* w does not contain three or more consecutive 1's\. The minimum number of…
- Question 64 – An 8-way set associative cache of size 64 KB (1 KB = 1024 bytes) is used in a system with 32-bit address. The address is sub-divided into TAG, INDEX,…
- Question 65 – The forwarding table of a router is shown below. Subnet Number / Subnet Mask / Interface ID: 200.150.0.0 / 255.255.0.0 / 1 200.150.64.0 /…