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.

4 on this page
Official PYQ2008Compiler DesignParsing (LL, LR)MCQ · 1 mark
Which of the following statements are true? Every left-recursive grammar can be converted to a right-recursive grammar and vice-versa All ϵ\epsilon-productions can be removed from any context-free grammar by suitable transformations The language generated by a context-free grammar all of whose productions are of the form X→wX \rightarrow w or …
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 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
Official PYQ2008DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
Consider a file of 1638416384 records. Each record is 32  bytes32\;\text{bytes} long and its key field is of size 6  bytes6\;\text{bytes}. The file is ordered on a non-key field, and the file organization is unspanned. The file is stored in a file system with block size 1024  bytes1024\;\text{bytes}, and the size of a block pointer is 10  bytes10\;\text{bytes}. If the secondary …