Skip to content

GATE CS question library

Practise GATE CS Computer Science previous year questions free. Browse by subject, syllabus topic, year and question type, with answers and available solutions.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

20 on this page
Official PYQ2024Engineering MathematicsMonoids and GroupsMSQ · 2 marks
Consider the operators ⋄\diamond and □\square defined by a⋄b=a+2b,a□b=aba \diamond b=a+2 b, a \square b=a b, for positive integers. Which of the following statements is/are TRUE?
Official PYQ2024Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMSQ · 2 marks
​​​​Consider two set-associative cache memory architectures: WBC\text{WBC}, which uses the write back policy, and WTC\text{WTC}, which uses the write through policy. Both of them use the LRU\text{LRU} (Least Recently Used) block replacement policy. The cache memory is connected to the main memory. Which of the following statements is/are TRUE?
Official PYQ2024Operating SystemI/O SchedulingNAT · 2 marks
Consider a 512512 GB hard disk with 3232 storage surfaces. There are 40964096 sectors per track and each sector holds 10241024 bytes of data. The number of cylinders in the hard disk is _________.
Official PYQ2024Operating SystemSystem CallsNAT · 2 marks
Consider the following code snippet using the fork () and wait () system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully without any errors. int x=3; while (x>0){ fork (); printf("hello"); wait (NULL) ; X-- ; } The total number of times the printf statement is executed is __________.
Official PYQ2024Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageNAT · 2 marks
A given program has 25%25 \% load/store instructions. Suppose the ideal CPI\text{CPI} (cycles per instruction) without any memory stalls is 22. The program exhibits 2%2 \% miss rate on instruction cache and 8%8 \% miss rate on data cache. The miss penalty is 100100 cycles. The speedup (rounded off to two decimal places) achieved with a perfect …
Official PYQ2024Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageNAT · 2 marks
The baseline execution time of a program on a 2GHz2 \mathrm{GHz} single core machine is 100100 nanoseconds ( ns)n s). The code corresponding to 90%90 \% of the execution time can be fully parallelized. The overhead for using an additional core is 10 ns10 ~ns when running on a multicore system. Assume that all cores in the multicore system run their share …
Official PYQ2024Compiler DesignParsing (LL, LR)NAT · 2 marks
Let G=(V,Σ,S,P)G=(V, \Sigma, S, P) be a context-free grammar in Chomsky Normal Form with Σ={a,b,c}\Sigma=\{a, b, c\} and VV containing 1010 variable symbols including the start symbol SS. The string w=a30b30c30w=a^{30} b^{30} c^{30} is derivable from SS. The number of steps (application of rules) in the derivation S→∗wS \rightarrow^* w is __________.
Official PYQ2024Computer NetworksRouting Protocols: Shortest Path, Flooding, Distance Vector, Link StateNAT · 2 marks
Consider the entries shown below in the forwarding table of an IP\text{IP} router. Each entry consists of an IP\text{IP} prefix and the corresponding next hop router for packets whose destination IP\text{IP} address matches the prefix. The notation " /N\mathrm{N} " in a prefix indicates a subnet mask with the most significant N\mathrm{N} bits set …
Official PYQ2024AlgorithmsGraph Traversals (BFS, DFS)NAT · 2 marks
The number of edges present in the forest generated by the DFS\text{DFS} traversal of an undirected graph GG with 100100 vertices is 4040. The number of connected components in GG is __________.
Official PYQ2024Theory of ComputationRegular Expressions and Finite AutomataNAT · 2 marks
Consider the following two regular expressions over the alphabet {0,1}\{0,1\} : r=0∗+1∗r= 0^{*}+1^{*} s=01∗+10∗s = 01^{*} + 10^{*} The total number of strings of length less than or equal to 55, which are neither in rr nor in ss, is ________.
Official PYQ2024Operating SystemMemory Management and Virtual MemoryNAT · 2 marks
Consider a memory management system that uses a page size of 2 KB2 \mathrm{~KB}. Assume that both the physical and virtual addresses start from 00. Assume that the pages 0,1,20,1,2, and 33 are stored in the page frames 1,3,21,3,2, and 00, respectively. The physical address (in decimal format) corresponding to the virtual address 25002500 (in decimal …
Official PYQ2024Engineering MathematicsConditional Probability and Bayes TheoremNAT · 2 marks
A bag contains 1010 red balls and 1515 blue balls. Two balls are drawn randomly without replacement. Given that the first ball drawn is red, the probability (rounded off to 33 decimal places) that both balls drawn are red is ___________.
Official PYQ2024Digital LogicCombinational CircuitsNAT · 2 marks
Consider a digital logic circuit consisting of three 22-to-11 multiplexers M1, M2\text{M1, M2}, and M3\text{M3} as shown below. X1\mathrm{X} 1 and X2\mathrm{X} 2 are inputs of M1\mathrm{M} 1. X3\text{X3} and X4\text{X4} are inputs of M2\text{M2}. A, B\text{A, B}, and C\text{C} are select lines of M1, M2\text{M1, M2}, and M3\text{M3}, …
Official PYQ2024Computer NetworksFragmentation and IP Addressing, IPv4, CIDRNAT · 2 marks
Consider sending an IP\text{IP} datagram of size 14201420 bytes (including 2020 bytes of IP\text{IP} header) from a sender to a receiver over a path of two links with a router between them. The first link (sender to router) has an MTU\text{MTU} (Maximum Transmission Unit) size of 542542 bytes, while the second link (router to receiver) has an …
Official PYQ2024General AptitudeMCQ · 1 mark
If ' →\rightarrow ' denotes increasing order of intensity, then the meaning of the words [dry →\rightarrow arid →\rightarrow parched] is analogous to [diet →\rightarrow fast →\rightarrow ________ ]. Which one of the given options is appropriate to fill the blank?
Official PYQ2024General AptitudeMCQ · 1 mark
​​​If two distinct non-zero real variables xx and yy are such that (x+y)(x+y) is proportional to (x−y)(x-y) then the value of xy\frac{x}{y}
Official PYQ2024General AptitudeMCQ · 1 mark
Consider the following sample of numbers: 9,18,11,14,15,17,10,69,11,139,18,11,14,15,17,10,69,11,13 The median of the sample is
Official PYQ2024General AptitudeMCQ · 1 mark
​​​​The number of coins of ₹11, ₹55, and ₹1010 denominations that a person has are in the ratio 5:3:135:3:13. Of the total amount, the percentage of money in ₹55 coins is
Official PYQ2024General AptitudeMCQ · 1 mark
For positive non-zero real variables pp and qq, if log⁡(p2+q2)=log⁡p+log⁡q+2log⁡3,\log \left(p^2+q^2\right)=\log p+\log q+2 \log 3, then, the value of p4+q4p2q2\frac{p^4+q^4}{p^2 q^2} is
Official PYQ2024General AptitudeMCQ · 2 marks
In the given text, the blanks are numbered (i) - (iv)\text{(i) - (iv)}. Select the best match for all the blanks. Steve was advised to keep his head (i) before heading (ii) to bat; for, while he had a head (iii) batting, he could only do so with a cool head iv his shoulders.