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 PYQ2004Digital LogicCombinational CircuitsMCQ · 1 mark
Consider the partial implementation of a 2−bit2-bit counter using TT flip-flops following the sequence 0−2−3−1−0,0-2-3-1-0, as shown below. To complete the circuit, the input XX should be
Official PYQ2004Digital LogicCombinational CircuitsMCQ · 1 mark
Consider a multiplexer with XX and YY as data inputs and ZZ the as the control input. Z=0Z=0 selects input XX, and Z=1Z=1 selects input YY. What are the connections required to realize the 2-variable Boolean function f=T+Rf=T+R, without using any additional hardware?
Official PYQ2004Digital LogicMinimization (K-Maps etc.)MCQ · 1 mark
Which are the essential prime implicants of the following Boolean function? f(a,b,c)=a′c+ac′+b′cf(a, b, c)= a' c+ ac'+b' c
Official PYQ2004Digital LogicCombinational CircuitsMCQ · 1 mark
A circuit outputs a digit in the form of 44 bits. 00 is represented by 0000,10000, 1 by 0001,…,90001, \ldots, 9 by 10011001. A combinational circuit is to be designed which takes these 44 bits as input and outputs 11 if the digit ≥\geq 55, and 00 otherwise. If only AND,OR\textsf{AND}, \textsf{OR} and NOT\textsf{NOT} gates may be used, what is …
Official PYQ2004Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 1 mark
The routing table of a router is shown below: …
Official PYQ2004Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 1 mark
Consider three IP networks A,BA, B and CC. Host HAH_A in network AA sends messages each containing 180180 bytes of application data to a host HCH_C in network CC. The TCP\text{TCP} layer prefixes 2020 byte header to the message. This passes through an intermediate network BB.The maximum packet size, including 2020 byte IP header, in …
Official PYQ2004Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 1 mark
AA and BB are the only two stations on an Ethernet. Each has a steady queue of frames to send. Both AA and BB attempt to transmit a frame, collide, and AA wins the first backoff race. At the end of this successful transmission by AA, both AA and BB attempt to transmit and collide. The probability that AA wins the second backoff …
Official PYQ2004DatabasesTuple Calculus and SQLMCQ · 1 mark
The employee information in a company is stored in the relation Employee (name, sex, salary, deptName) Consider the following SQL query Select deptName From Employee Where sex = ‘M’ Group by deptName Having avg(salary) > (select avg (salary) from Employee) It returns the names of the department in which
Official PYQ2004DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
The order of an internal node in a B+B+ tree index is the maximum number of children it can have. Suppose that a child pointer takes 66 bytes, the search field value takes 1414 bytes, and the block size is 512512 bytes. What is the order of the internal node?
Official PYQ2004DatabasesNormal FormsMCQ · 1 mark
Consider the relation Student (name, sex, marks), where the primary key is shown underlined, pertaining to students in a class that has at least one boy and one girl. What does the following relational algebra expression produce? (Note: ρ\rho is the rename operator). …
Official PYQ2004DatabasesNormal FormsMCQ · 1 mark
The relation scheme Student Performance (name, courseNo, rollNo, grade)\text{Student Performance (name, courseNo, rollNo, grade)} has the following functional dependencies: name, courseNo, →\rightarrow grade rollNo, courseNo →\rightarrow grade name →\rightarrow rollNo rollNo →\rightarrow name The highest normal form of this relation scheme is
Official PYQ2004Operating SystemI/O SchedulingMCQ · 1 mark
A unix-style I-nodes has 1010 direct pointers and one single, one double and one triple indirect pointers. Disk block size is 11 Kbyte, disk block address is 3232 bits, and 4848-bit integers are used. What is the maximum possible file size?
Official PYQ2004Operating SystemCPU SchedulingMCQ · 1 mark
Consider the following set of processes, with the arrival times and the CPU-burst times gives in milliseconds. …
Official PYQ2004Compiler DesignSyntax-directed TranslationMCQ · 1 mark
Consider the grammar with the following translation rules and EE as the start symbol …
Official PYQ2004Operating SystemConcurrency and SynchronizationMCQ · 1 mark
Consider two processes P1P_1 and P2P_2 accessing the shared variables XX and YY protected by two binary semaphores SXS_X and SYS_Y respectively, both initialized to 1. PP and VV denote the usual semaphore operators, where PP decrements the semaphore value, and VV increments the semaphore value. The pseudo-code of P1P_1 and P2P_2 …
Official PYQ2004AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 1 mark
Suppose we run Dijkstra’s single source shortest path algorithm on the following edge-weighted directed graph with vertex PP as the source. In what order do the nodes get included into the set of vertices for which the shortest path distances are finalized?
Official PYQ2004Programming and Data StructuresTreesMCQ · 1 mark
Consider the following C program segment struct CellNode{ struct CellNode *leftChild int element; struct CellNode *rightChild; }; int Dosomething (struct CellNode *ptr) { int value = 0; if(ptr != NULL) { if (ptr -> leftChild != NULL) value = 1 + DoSomething (ptr -> leftChild); if (ptr -> rightChild != NULL) value = max(value, 1 + Dosomething (ptr …
Official PYQ2004AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following C program main() { int x, y, m, n; scanf("%d %d", &x, &y); /* Assume x>0 and y>0*/ m = x; n = y; while(m != n) { if (m > n) m = m-n; else n = n-m; } printf("%d", n); } The program computes
Official PYQ2004Programming and Data StructuresLinked ListsMCQ · 1 mark
Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among union, intersection, membership, cardinality\text{union, intersection, membership, cardinality} will be the slowest?
Official PYQ2004AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
What does the following algorithm approximate? (Assume m>1,ϵ>0m > 1, \epsilon >0). x = m; y = 1; While (x-y > ϵ) { x = (x+y)/2; y = m/x; } print(x);