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 MathematicsProbability: Random Variables and DistributionsMCQ · 1 mark
​​​​​​When six unbiased dice are rolled simultaneously, the probability of getting all distinct numbers (i.e.,1,2,3,4,5,and 6)(i.e., 1, 2, 3, 4, 5, \text{and } 6) is
Official PYQ2024DatabasesTransactions and Concurrency ControlMCQ · 1 mark
​​​​​Once the DBMS\text{DBMS} informs the user that a transaction has been successfully completed, its effect should persist even if the system crashes before all its changes are reflected on disk. This property is called
Official PYQ2024DatabasesER-modelMCQ · 1 mark
In the context of owner and weak entity sets in the ER\text{ER} (Entity-Relationship) data model, which one of the following statements is TRUE?
Official PYQ2024Compiler DesignLexical AnalysisMCQ · 1 mark
​​​Consider the following two sets: …
Official PYQ2024Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
​​​​Which one of the following regular expressions is equivalent to the language accepted by the DFA\text{DFA} given below?
Official PYQ2024Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 1 mark
​Node X\text{X} has a TCP\text{TCP} connection open to node Y\text{Y}. The packets from X\text{X} to Y\text{Y} go through an intermediate IP\text{IP} router R\mathrm{R}. Ethernet switch S\mathrm{S} is the first switch on the network path between X\mathrm{X} and R\mathrm{R}. Consider a packet sent from X\mathrm{X} to …
Official PYQ2024Operating SystemMemory Management and Virtual MemoryMSQ · 1 mark
​Which of the following tasks is/are the responsibility/responsibilities of the memory management unit (MMU)\text{(MMU)} in a system with paging-based memory management?
Official PYQ2024Operating SystemProcesses and ThreadsMSQ · 1 mark
​​​​Consider a process P\text{P} running on a CPU\text{CPU}. Which one or more of the following events will always trigger a context switch by the OS\text{OS} that results in process P\mathrm{P} moving to a non-running state (e.g., ready, blocked)?
Official PYQ2024DatabasesFile Organization and Indexing (B and B+ Trees)MSQ · 1 mark
​​​​​Which of the following file organizations is/are I/O\text{I/O} efficient for the scan operation in DBMS\text{DBMS}?
Official PYQ2024DatabasesTransactions and Concurrency ControlMSQ · 1 mark
​​​​Which of the following statements about the Two Phase Locking (2PL2 \mathrm{PL}) protocol is/are TRUE?
Official PYQ2024Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMSQ · 1 mark
​​​​​Which of the following statements about IPv4\text{IPv4} fragmentation is/are TRUE?
Official PYQ2024Computer Organization and ArchitectureInstruction PipeliningMCQ · 1 mark
​​​​​An instruction format has the following structure: Instruction Number: Opcode destination reg, source reg-11, source reg-22 Consider the following sequence of instructions to be executed in a pipelined processor: I 1: DIV R3, R1, R2\text{I 1: DIV R3, R1, R2} I 2: SUB R5, R3, R4\text{I 2: SUB R5, R3, R4} I 3: ADD R3, R5, R6\text{I 3: ADD R3, R5, R6} I 4: MUL R7, R3, R8\text{I 4: MUL R7, R3, R8} Which of the …
Official PYQ2024Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMSQ · 1 mark
​​​​Which of the following fields of an IP\text{IP} header is/are always modified by any router before it forwards the IP\text{IP} packet?
Official PYQ2024Compiler DesignSyntax-directed TranslationMSQ · 1 mark
​​​​​Which of the following statements is/are FALSE?
Official PYQ2024Digital LogicBoolean AlgebraMSQ · 1 mark
​​​​For a Boolean variable xx, which of the following statements is/are FALSE?
Official PYQ2024Programming and Data StructuresProgramming in CMSQ · 1 mark
​​​Consider the following C\mathrm{C} function definition. int fX(char *a) { char *b = a; while (*b) b++; return b - a; } Which of the following statements is/are TRUE?
Official PYQ2024Engineering MathematicsPartial Orders and LatticesNAT · 1 mark
Let P\text{P} be the partial order defined on the set {1,2,3,4}\{1,2,3,4\} as follows P={(x,x)∣x∈{1,2,3,4}}∪{(1,2),(3,2),(3,4)}P=\{(x, x) \mid x \in\{1,2,3,4\}\} \cup\{(1,2),(3,2),(3,4)\} The number of total orders on {1,2,3,4}\{1,2,3,4\} that contain P\text{P} is __________.
Official PYQ2024AlgorithmsSearching, Sorting, HashingNAT · 1 mark
Let A\text{A} be an array containing integer values. The distance of A\text{A} is defined as the minimum number of elements in A\text{A} that must be replaced with another integer so that the resulting array is sorted in non-decreasing order. The distance of the array [2,5,3,1,4,2,6][2,5,3,1,4,2,6] is ___________.
Official PYQ2024Programming and Data StructuresProgramming in CMCQ · 2 marks
​​​​​What is the output of the following C\text{C} program? #include <stdio.h> int main() { double a[2]={20.0,25.0},* p,* q; p=a ; q=p+1 ; printf("%d,%d", (int) (q-p),( int)(* q- * p)); return 0;}
Official PYQ2024Operating SystemCPU SchedulingMCQ · 2 marks
​​​​Consider a single processor system with four processes A, B, C,\text{A, B, C,} and D\text{D}, represented as given below, where for each process the first value is its arrival time, and the second value is its CPU\text{CPU} burst time. A(0,10),B(2,6),C(4,3)\mathrm{A}(0,10), \mathrm{B}(2,6), \mathrm{C}(4,3), and D(6,7)\mathrm{D}(6,7). Which one of the following options …