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
An array is heapified. Which one of the following options represents the first three elements in the heapified array?
Consider the following recurrence relation: Which one of the following options is CORRECT?
Consider a binary min-heap containing distinct elements. Let be the index (in the underlying array) of the maximum element stored in the heap. The number of possible values of is
The symbol indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?
Let be a directed graph and a depth first search spanning tree in that is rooted at a vertex . Suppose is also a breadth first search tree in , rooted at . Which of the following statements is/are TRUE for every such graph and tree ?
Consider the following read-write schedule over three transactions , and , where the subscripts in the schedule indicate transaction IDs: Which of the following transaction schedules is/are conflict equivalent to …
Consider a Boolean expression given by . Which of the following statements is/are CORRECT?
Consider the following function definition. int f (int x, int y){ for (int i=0 ; i<y ; i++ ) { x= x + x + y; } return x; } Which of the following statements is/are TRUE about the above function?
Let be any matrix, where . Which of the following statements is/are TRUE about the system of linear equations ?
Consider the -state . accepting the language shown below. For any string let be the number of in and be the number of 1 's in . Which of the following statements is/are FALSE?
The chromatic number of a graph is the minimum number of colours used in a proper colouring of the graph. Let be any graph with vertices and chromatic number . Which of the following statements is/are always TRUE?
Consider the operators and defined by , for positive integers. Which of the following statements is/are TRUE?
Consider two set-associative cache memory architectures: , which uses the write back policy, and , which uses the write through policy. Both of them use the (Least Recently Used) block replacement policy. The cache memory is connected to the main memory. Which of the following statements is/are TRUE?
Consider a GB hard disk with storage surfaces. There are sectors per track and each sector holds bytes of data. The number of cylinders in the hard disk is _________.
Consider the following code snippet using the fork () and wait () system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully without any errors. int x=3; while (x>0){ fork (); printf("hello"); wait (NULL) ; X-- ; } The total number of times the printf statement is executed is __________.
A given program has load/store instructions. Suppose the ideal (cycles per instruction) without any memory stalls is . The program exhibits miss rate on instruction cache and miss rate on data cache. The miss penalty is cycles. The speedup (rounded off to two decimal places) achieved with a perfect …
The baseline execution time of a program on a single core machine is nanoseconds ( . The code corresponding to of the execution time can be fully parallelized. The overhead for using an additional core is when running on a multicore system. Assume that all cores in the multicore system run their share …
Let be a context-free grammar in Chomsky Normal Form with and containing variable symbols including the start symbol . The string is derivable from . The number of steps (application of rules) in the derivation is __________.
Consider the entries shown below in the forwarding table of an router. Each entry consists of an prefix and the corresponding next hop router for packets whose destination address matches the prefix. The notation " / " in a prefix indicates a subnet mask with the most significant bits set …
The number of edges present in the forest generated by the traversal of an undirected graph with vertices is . The number of connected components in is __________.
