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 PYQ2012Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following C code segment. int a, b, c = 0; void prtFun(void); main() { static int a = 1; /* Line 1 */ prtFun(); a += 1; prtFun(); printf(“ \n %d %d ”, a, b); } void prtFun(void) { static int a = 2; /* Line 2 */ int b = 1; a += ++b; printf(“ \n %d %d ”, a, b); } What output will be generated by the given code segment if: Line 1 is replaced by …
Official PYQ2012DatabasesTuple Calculus and SQLMCQ · 1 mark
Consider the following relations A,BA, B and C:C: …
Official PYQ2012Compiler DesignParsing (LL, LR)MCQ · 1 mark
For the grammar below, a partial LL(1)LL(1) parsing table is also presented along with the grammar. Entries that need to be filled are indicated as E1,E2,E1, E2, and E3E3. ε\varepsilon is the empty string, \$ indicates end of input, and, ∣\mid separates alternate right hand sides of productions. S→aAbB∣bAaB∣εS \rightarrow a A b B \mid b A a B \mid \varepsilon …
Official PYQ2012Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
A computer has a 256256-KByte\text{KByte}, 4-way set associative, write back data cache with block size of 3232 Bytes\text{Bytes}. The processor sends 3232 bit\text{bit} addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 22 valid bits, 11 modified bit and 11 replacement bit. The size of the …
Official PYQ2012General AptitudeMCQ · 1 mark
Given the sequence of terms, AD CG FK JP\text{AD CG FK JP}, the next term is
Official PYQ2012General AptitudeMCQ · 1 mark
An automobile plant contracted to buy shock absorbers from two suppliers XX and YY . XX supplies 60%60\% and Y supplies 40%40\% of the shock absorbers. All shock absorbers are subjected to a quality test. The ones that pass the quality test are considered reliable. Of X’sX’s shock absorbers, 96%96\% are reliable. Of Y’sY’s shock absorbers, …
Official PYQ2012General AptitudeMCQ · 1 mark
Which of the following assertions are CORRECT? P: Adding 77 to each entry in a list adds 77 to the mean of the list Q: Adding 77 to each entry in a list adds 77 to the standard deviation of the list R: Doubling each entry in a list doubles the mean of the list S: Doubling each entry in a list leaves the standard deviation of the list unchanged
Official PYQ2012General AptitudeMCQ · 1 mark
A political party orders an arch for the entrance to the ground in which the annual convention is being held. The profile of the arch follows the equation y=2x−0.1x2y=2x-0.1x^{2} where yy is the height of the arch in meters. The maximum possible height of the arch is
Official PYQ2012General AptitudeMCQ · 1 mark
Wanted Temporary, Part-time persons for the post of Field Interviewer to conduct personal interviews to collect and collate economic data. Requirements: High School-pass, must be available for Day, Evening and Saturday work. Transportation paid, expenses reimbursed. Which one of the following is the best inference from the above advertisement?
Official PYQ2012General AptitudeMCQ · 1 mark
Choose the most appropriate alternative from the options given below to complete the following sentence: Suresh’s dog is the one ________ was hurt in the stampede.
Official PYQ2012General AptitudeMCQ · 1 mark
Choose the grammatically INCORRECT sentence:
Official PYQ2012General AptitudeMCQ · 1 mark
Which one of the following options is the closest in meaning to the word given below? Mitigate
Official PYQ2012General AptitudeMCQ · 1 mark
Choose the most appropriate alternative from the options given below to complete the following sentence: Despite several _________ the mission succeeded in its attempt to resolve the conflict.
Official PYQ2012General AptitudeMCQ · 1 mark
The cost function for a product in a firm is given by 5q25q^{2}, where qq is the amount of production. The firm can sell the product at a market price of ₹50\text₹ 50 per unit. The number of units to be produced by the firm such that the profit is maximized is
Official PYQ2012Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
A computer has a 256-KByte256\text{-KByte}, 4-way set associative, write back data cache with block size of 32-Bytes32\text{-Bytes}. The processor sends 32-bit32\text{-bit} addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 22 valid bits, 11 modified bit and 11 replacement bit. The number of bits in the tag …
Official PYQ2012DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Consider the following relations A,BA, B and C:C: …
Official PYQ2012Programming and Data StructuresTreesMCQ · 1 mark
The height of a tree is defined as the number of edges on the longest path in the tree. The function shown in the pseudo-code below is invoked as height (root) to compute the height of a binary tree rooted at the tree pointer root. int height(treeptr n) { if(n == NULL) return -1; if(n -> left == NULL) if(n -> right == NULL) return 0; else return B1; // …
Official PYQ2012Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following C code segment. int a, b, c = 0; void prtFun(void); main() { static int a = 1; /* Line 1 */ prtFun(); a += 1; prtFun(); printf(“ \n %d %d ”, a, b); } void prtFun(void) { static int a = 2; /* Line 2 */ int b = 1; a += ++b; printf(“ \n %d %d ”, a, b); } What output will be generated by the given code segment?
Official PYQ2012Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the set of strings on {0,1}\{0,1\} in which, every substring of 33 symbols has at most two zeros. For example, 001110001110 and 011001011001 are in the language, but 100010100010 is not. All strings of length less than 33 are also in the language. A partially completed DFA that accepts this language is shown below. The missing arcs in the DFA are:
Official PYQ2012Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
Consider an instance of TCP’s Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is 22 MSS and the threshold at the start of the first transmission is 88 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of the tenth …