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 PYQ2005Compiler DesignParsing (LL, LR)MCQ · 1 mark
Consider the following expression grammar. The semantic rules for expression evaluation are stated next to each grammar production. …
Official PYQ2005AlgorithmsAlgorithm Design: Greedy TechniquesMCQ · 1 mark
We are given 99 tasks T1,T2,…,T9T_1, T_2, \dots, T_9. The execution of each task requires one unit of time. We can execute one task at a time. Each task TiT_i has a profit PiP_i and a deadline did_i. Profit PiP_i is earned if the task is completed before the end of the dithd_i^{th} unit of time. …
Official PYQ2005Programming and Data StructuresRecursionMCQ · 1 mark
double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } } Suppose we modify the above function foo()foo() and stores the value of foo(i) 0≤i<nfoo(i) \ 0 \leq i < n, as and when they are computed. With this modification the time complexity for function foo()foo() is significantly …
Official PYQ2005Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
Consider the following floating-point format. Mantissa is a pure fraction in sign-magnitude form. The normalized representation for the above format is specified as follows. The mantissa has an implicit 11 preceding the binary (radix) point. Assume that only 0’s0’s are padded in while shifting a field. The normalized representation of the above number …
Official PYQ2005AlgorithmsGraph Traversals (BFS, DFS)MCQ · 1 mark
Let ss and tt be two vertices in a undirected graph G=(V,E)G=(V,E) having distinct positive edge weights. Let [X,Y][X,Y] be a partition of VV such that s∈Xs \in X and t∈Yt \in Y. Consider the edge ee having the minimum weight amongst all those edges that have one vertex in XX and one vertex in YY. Let the weight of an edge ee denote the …
Official PYQ2005Computer Organization and ArchitectureALU, Data-path and Control UnitMCQ · 1 mark
Consider the following data path of a CPU.\text{CPU}. The ALU,\text{ALU}, the bus and all the registers in the data path are of identical size. All operations including incrementation of the PC\text{PC} and the GPRs\text{GPRs} are to be carried out in the ALU.\text{ALU}. Two clock cycles are needed for memory read operation – the first one for loading …
Official PYQ2005Compiler DesignParsing (LL, LR)MCQ · 1 mark
Consider line number 33 of the following C-program. int main() { /*Line 1 */ int I, N; /*Line 2 */ fro (I=0, I<N, I++); /*Line 3 */ } Identify the compiler’s response about this line while creating the object-module:
Official PYQ2005Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
Consider the following floating-point format. Mantissa is a pure fraction in sign-magnitude form. The decimal number 0.239×2130.239 \times 2^{13} has the following hexadecimal representation (without normalization and rounding off):
Official PYQ2005AlgorithmsAlgorithm Design: Greedy TechniquesMCQ · 1 mark
We are given 99 tasks T1,T2,…,T9T_1, T_2, \dots, T_9. The execution of each task requires one unit of time. We can execute one task at a time. Each task TiT_i has a profit PiP_i and a deadline did_i. Profit PiP_i is earned if the task is completed before the end of the dithd_i^{th} unit of time. …
Official PYQ2005Compiler DesignParsing (LL, LR)MCQ · 1 mark
Statement for Linked Answer Questions 83a & 83b: Consider the following expression grammar. The semantic rules for expression evaluation are stated next to each grammar production. …
Official PYQ2005AlgorithmsGraph Traversals (BFS, DFS)MCQ · 1 mark
Let ss and tt be two vertices in a undirected graph G=(V,E)G=(V,E) having distinct positive edge weights. Let [X,Y][X,Y] be a partition of VV such that s∈Xs \in X and t∈Yt \in Y. Consider the edge ee having the minimum weight amongst all those edges that have one vertex in XX and one vertex in YY. The edge ee must definitely belong to:
Official PYQ2005AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } } The space complexity of the above code is?
Official PYQ2005Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 1 mark
Consider the following data path of a CPU.\text{CPU}. The ALU,\text{ALU}, the bus and all the registers in the data path are of identical size. All operations including incrementation of the PC\text{PC} and the GPRs\text{GPRs} are to be carried out in the ALU.\text{ALU}. Two clock cycles are needed for memory read operation – the first one for loading …
Official PYQ2005DatabasesIntegrity ConstraintsMCQ · 1 mark
Consider a relation scheme R=(A,B,C,D,E,H)R = (A, B, C, D, E, H) on which the following functional dependencies hold: {A→BA \rightarrow B, BC→DBC \rightarrow D, E→CE \rightarrow C, D→AD \rightarrow A}. What are the candidate keys R?
Official PYQ2005DatabasesTuple Calculus and SQLMCQ · 1 mark
The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list? select title from book as B where (select count(*) from book as T where T.price>B.price) < 5
Official PYQ2005DatabasesIntegrity ConstraintsMCQ · 1 mark
The following table has two attributes AA and CC where AA is the primary key and CC is the foreign key referencing AA with on-delete cascade. …
Official PYQ2005DatabasesER-modelMCQ · 1 mark
Let E1E_1 and E2E_2 be two entities in an E/RE/R diagram with simple-valued attributes. R1R_1 and R2R_2 are two relationships between E1E_1 and E2E_2, where R1R_1 is one-to-many and R2R_2 is many-to-many. R1R_1 and R2R_2 do not have any attributes of their own. What is the minimum number of tables required to represent this situation in …
Official PYQ2005Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 1 mark
Suppose the round trip propagation delay for a 10 Mbps10\text{ Mbps} Ethernet having 48-bit48\text{-bit} jamming signal is 46.4 μs46.4\ \mu s. The minimum frame size is:
Official PYQ2005Computer NetworksPacket, Circuit and Virtual Circuit SwitchingMCQ · 1 mark
In a packet switching network, packets are routed from source to destination along a single path having two intermediate nodes. If the message size is 2424 bytes and each packet contains a header of 33 bytes, then the optimum packet size is:
Official PYQ2005Operating SystemDeadlockMCQ · 1 mark
Suppose nn processes, P1,…PnP_1, \dots P_n share mm identical resource units, which can be reserved and released one at a time. The maximum resource requirement of process PiP_i is sis_i, where si>0s_i > 0. Which one of the following is a sufficient condition for ensuring that deadlock does not occur?