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 PYQ2005Programming and Data StructuresBinary HeapsMCQ · 1 mark
A priority queue is implemented as a Max-Heap. Initially, it has 55 elements. The level-order traversal of the heap is: 10,8,5,3,210, 8, 5, 3, 2. Two new elements 11 and 77 are inserted into the heap in that order. The level-order traversal of the heap after the insertion of the elements is:
Official PYQ2005Programming and Data StructuresBinary Search TreesMCQ · 1 mark
Postorder traversal of a given binary search tree, TT produces the following sequence of keys 10,9,23,22,27,25,15,50,95,60,40,2910, 9, 23, 22, 27, 25, 15, 50, 95, 60, 40, 29 Which one of the following sequences of keys can be the result of an in-order traversal of the tree TT?
Official PYQ2005Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following C program: double foo (double); /* Line 1 */ int main() { double da, db; //input da db = foo(da); } double foo (double a) { return a; } The above code compiled without any error or warning. If Line 11 is deleted, the above code will show:
Official PYQ2005AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following C-program: void foo (int n, int sum) { int k = 0, j = 0; if (n == 0) return; k = n % 10; j = n/10; sum = sum + k; foo (j, sum); printf ("%d,",k); } int main() { int a = 2048, sum = 0; foo(a, sum); printf("%d\n", sum); } What does the above program print?
Official PYQ2005DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Let r be a relation instance with schema R = (A, B, C, D). We define r1=πA,B,C(R)r_1 = \pi_{A, B, C} (R) and r2=πA,D(r)r_2=\pi_{A, D} (r). Let s=r1 ∗ r2s =r_1 \: * \: r_2 where ∗* denotes natural join. Given that the decomposition of rr into r1r_1 and r2r_2 is lossy, which one of the following is TRUE?
Official PYQ2005DatabasesNormal FormsMCQ · 1 mark
Which one of the following statements about normal forms is FALSE?\text{FALSE}?
Official PYQ2005DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
Which of the following is a key factor for preferring B+B^+-trees to binary search trees for indexing database relations?
Official PYQ2005Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 1 mark
An organization has a class BB network and wishes to form subnets for 6464 departments. The subnet mask would be:
Official PYQ2005Computer NetworksRouting Protocols: Shortest Path, Flooding, Distance Vector, Link StateMCQ · 1 mark
In a network of LANs connected by bridges, packets are sent from one LAN to another through intermediate bridges. Since more than one path may exist between two LANs, packets may have to be routed through multiple bridges. Why is the spanning tree algorithm used for bridge-routing?
Official PYQ2005Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
The maximum window size for data transmission using the selective reject protocol with n-bitn\text{-bit} frame sequence numbers is:
Official PYQ2005Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
The address resolution protocol (ARP) is used for:
Official PYQ2005Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
Packets of the same session may be routed through different paths in:
Official PYQ2005Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
Increasing the RAM of a computer typically improves performance because:
Official PYQ2005Operating SystemI/O SchedulingMCQ · 1 mark
What is the swap space in the disk used for?
Official PYQ2005Operating SystemI/O SchedulingMCQ · 1 mark
Normally user programs are prevented from handling I/O directly by I/O instructions in them. For CPUs having explicit I/O instructions, such I/O protection is ensured by having the I/O instruction privileged. In a CPU with memory mapped I/O, there is no explicit I/O instruction. Which one of the following is true for a CPU with memory mapped I/O?
Official PYQ2005Operating SystemI/O SchedulingMCQ · 1 mark
Which one of the following is true for a CPU having a single interrupt request line and a single interrupt grant line?
Official PYQ2005Digital LogicMinimization (K-Maps etc.)MCQ · 1 mark
The switching expression corresponding to f(A,B,C,D)=Σ(1,4,5,9,11,12)f(A,B,C,D)=\Sigma(1, 4, 5, 9, 11, 12) is:
Official PYQ2005Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
The hexadecimal representation of (657)8 is:
Official PYQ2005Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
The range of integers that can be represented by an nn bit 2’s2’s complement number system is:
Official PYQ2005Digital LogicCombinational CircuitsMCQ · 1 mark
Consider the following circuit. Which one of the following is TRUE?