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 PYQ2008DatabasesER-modelMCQ · 1 mark
Consider the following ER\text{ER} diagram The minimum number of tables needed to represent MM, NN, PP, R1R1, R2R2 is Which of the following is a correct attribute set for one of the tables for the minimum number of tables needed to represent MM, NN, PP, R1R1, R2R2?
Official PYQ2008AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
Consider the following C program that attempts to locate an element xx in an array Y[ ]Y[ \ ] using binary search. The program is erroneous. f (int Y[10] , int x) { int i, j, k; i= 0; j = 9; do { k = (i + j) / 2; if( Y[k] < x) i = k;else j = k; } while (Y[k] != x) && (i < j)) ; if(Y[k] == x) printf(" x is in the array ") ; else printf(" x is …
Official PYQ2008Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
Consider a machine with a 22-way set associative data cache of size 6464 Kbytes and block size 1616 bytes. The cache is managed using 3232 bit virtual addresses and the page size is 44 Kbytes. A program to be run on this machine begins as follows: double ARR[1024][1024]; int i, j; /*Initialize array ARR to 0.0 */ for(i = 0; i < 1024; i++) …
Official PYQ2008Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
Consider a machine with a 22-way set associative data cache of size 6464 Kbytes and block size 1616 bytes. The cache is managed using 3232 bit virtual addresses and the page size is 44 Kbytes. A program to be run on this machine begins as follows: double ARR[1024][1024]; int i, j; /*Initialize array ARR to 0.0 */ for(i = 0; i < 1024; i++) …
Official PYQ2008AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following C functions: int f1 (int n) { if(n == 0 || n == 1) return n; else return (2 * f1(n-1) + 3 * f1(n-2)); } int f2(int n) { int i; int X[N], Y[N], Z[N]; X[0] = Y[0] = Z[0] = 0; X[1] = 1; Y[1] = 2; Z[1] = 3; for(i = 2; i <= n; i++){ X[i] = Y[i-1] + Z[i-2]; Y[i] = 2 * X[i]; Z[i] = 3 * X[i]; } return X[n]; } f1(8)f1(8) and f2(8)f2(8) return …
Official PYQ2008Computer Organization and ArchitectureInstruction PipeliningMCQ · 1 mark
Delayed branching can help in the handling of control hazards The following code is to run on a pipelined processor with one branch delay slot: I1: ADD R2←R7+R8R2 \leftarrow R7 + R8 I2: Sub R4←R5–R6R4 \leftarrow R5 – R6 I3: ADD R1←R2+R3R1 \leftarrow R2 + R3 I4: STORE Memory [R4]←R1[R4] \leftarrow R1 BRANCH to Label if R1==0R1 == 0 Which of the instructions I1, I2, I3 or I4 …
Official PYQ2008AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Let xnx_n denote the number of binary strings of length nn that contain no consecutive 00s. The value of x5x_5 is
Official PYQ2008AlgorithmsAlgorithm Design: Dynamic ProgrammingMCQ · 1 mark
The subset-sum problem is defined as follows. Given a set of nn positive integers, S={a1,a2,a3,…,an}S = \{ a_1, a_2, a_3, \dots , a_n \}, and positive integer WW, is there a subset of SS whose elements sum to WW? A dynamic program for solving this problem uses a 2-dimensional\text{2-dimensional} Boolean array, XX, with nn rows and W+1W+1 columns. …
Official PYQ2008AlgorithmsAlgorithm Design: Dynamic ProgrammingMCQ · 1 mark
The subset-sum problem is defined as follows. Given a set of nn positive integers, S={a1,a2,a3,…,an}S = \{ a_1, a_2, a_3, \dots , a_n \}, and positive integer WW, is there a subset of SS whose elements sum to WW? A dynamic program for solving this problem uses a 2-dimensional\text{2-dimensional} Boolean array, XX, with nn rows and W+1W+1 columns. …
Official PYQ2008Engineering MathematicsGraphs: Connectivity, Matching, ColouringMCQ · 1 mark
GG is a graph on nn vertices and 2n−22n-2 edges. The edges of GG can be partitioned into two edge-disjoint spanning trees. Which of the following is NOT true for GG?
Official PYQ2008AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Let xnx_n denote the number of binary strings of length nn that contain no consecutive 00s. Which of the following recurrences does xnx_n satisfy?
Official PYQ2008Computer Organization and ArchitectureInstruction PipeliningMCQ · 1 mark
Delayed branching can help in the handling of control hazards For all delayed conditional branch instructions, irrespective of whether the condition evaluates to true or false,
Official PYQ2008AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following C functions: int f1 (int n) { if(n == 0 || n == 1) return n; else return (2 * f1(n-1) + 3 * f1(n-2)); } int f2(int n) { int i; int X[N], Y[N], Z[N]; X[0] = Y[0] = Z[0] = 0; X[1] = 1; Y[1] = 2; Z[1] = 3; for(i = 2; i <= n; i++){ X[i] = Y[i-1] + Z[i-2]; Y[i] = 2 * X[i]; Z[i] = 3 * X[i]; } return X[n]; } The running time of f1(n)f1(n) …
Official PYQ2008Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
Consider a machine with a 22-way set associative data cache of size 64Kbytes64\text{Kbytes} and block size 16bytes16\text{bytes}. The cache is managed using 32  bit32\;\text{bit} virtual addresses and the page size is 4Kbytes4\text{Kbytes}. A program to be run on this machine begins as follows: double ARR[1024][1024]; int i, j; /*Initialize array ARR to 0.0 */ for(i = …
Official PYQ2008DatabasesNormal FormsMCQ · 1 mark
Consider the following relational schemes for a library database: Book (Title, Author, Catalog_no, Publisher, Year, Price) Collection(Title, Author, Catalog_no) with the following functional dependencies: Title Author → Catalog_no\text{Title Author }\rightarrow\text{ Catalog\_no} Catalog_no → Title Author Publisher Year\text{Catalog\_no }\rightarrow\text{ Title Author Publisher Year} …
Official PYQ2008DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Let R and S be two relations with the following schema R(P,Q‾,R1,R2,R3)R(\underline{P,Q}, R1, R2, R3) S(P,Q‾,S1,S2)S(\underline{P,Q}, S1, S2) where {P,Q}\left\{P, Q\right\} is the key for both schemas. Which of the following queries are equivalent? ΠP(R⋈S)\Pi_P \left(R \bowtie S\right) ΠP(R)⋈ΠP(S)\Pi_P \left(R\right) \bowtie \Pi_P\left(S\right) …
Official PYQ2008Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
A processor uses 3636 bit physical address and 3232 bit virtual addresses, with a page frame size of 44 Kbytes. Each page table entry is of size 44 bytes. A three level page table is used for virtual to physical address translation, where the virtual address is used as follows: Bits 30−3130-31 are used to index into the first level page table. Bits …
Official PYQ2008Operating SystemSystem CallsMCQ · 1 mark
A process executes the following code for(i=0; i<n; i++) fork(); The total number of child processes created is
Official PYQ2008Operating SystemDeadlockMCQ · 1 mark
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?
Official PYQ2008Computer Organization and ArchitectureI/O Interface: Interrupt and DMA ModeMCQ · 1 mark
Which of the following statements about synchronous and asynchronous I/O is NOT true?