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
Consider the following pseudocode for depth-first search (DFS) algorithm which takes a directed graph as input, where and are the discovery time and finishing time, respectively, of the vertex . …
Let and be two languages over a finite alphabet, such that and are regular languages. Which of the following statements is/are always true?
Consider a system that has a cache memory unit and a memory management unit (MMU). The address input to the cache memory is a physical address. The MMU has a translation lookaside buffer (TLB). Assume that when a page is evicted from the main memory, the corresponding blocks in the cache are marked as invalid. For a given memory reference, which of the …
Consider the following two syntax-directed definitions and for type declarations. …
Consider the following context-free grammar . In the above grammar, is the start symbol, and are terminal symbols, and and are non-terminal symbols. Let be the language …
An undirected, unweighted, simple graph is said to be -colorable if there exists a function such that for every . Which of the following statements about -colorable graphs is/are true?
Let be an undirected graph, which is a path on vertices. The number of matchings in is . (answer in integer)
An ISP having an address block assigns a block of IP addresses to a client, using the classless internet domain routing (CIDR) super-netting approach. Which of the following address blocks can be assigned by the ISP?
Let be a random variable which takes values in the set . Further, and . The expected value of , denoted by …
Consider a hard disk with a rotational speed of rpm. The time to move the read/write head from a track to its adjacent track is millisecond. Initially, the head is on track . The number of sectors per track is . The sector size is bytes. It is necessary to transfer data from randomly located sectors in each of the …
The EX stage of a pipelined processor performs the memory read operations for LOAD instructions, and the operations for the arithmetic and logic instructions. Let denote the time taken by the EX stage to perform the operation for an instruction. For each instruction type, the values of and (the number of instructions of that …
Consider the recursive functions represented by the following code segment: int bar(int n) { if (n == 1) return 0; else return 1 + bar(n/2); } int foo(int n) { if (n == 1) return 1; else return 1 + foo(bar(n)); } The smallest positive integer n for which returns is . (answer in integer) Note: Ignore …
The following sequence corresponds to the preorder traversal of a binary search tree : The position of the element in the postorder traversal of is . (answer in integer) Note: The position begins with .
Consider the following program snippet. Assume that the program compiles and runs successfully. Further, assume that the fork() system call is always successful in creating a process. int main () { int i; for (i = 0; i < 3; i++) { if (fork() == 0) { continue; } break; } printf("Hello!"); return 0; } The total number of times that the printf statement gets …
Consider a CPU that has to execute two types of processes. The first type, Actuators (A), requires a CPU burst of seconds. The second type, Controllers (C), requires a CPU burst of seconds. A new process of type A arrives at time , , and (in seconds). Similarly, a new process of type C arrives at time …
Consider a relational database schema with a relation . If and are the only two candidate keys of the relation , then the number of superkeys of relation is . (answer in integer)
Expedite, Hasten, Hurry, Fill the blank by choosing a word with a meaning similar to that of the words given above.
A black square PQRS has been cut into two parts. One part of it is shown in Panel Which one of the shapes in Panel is the other part?
A day can only be cloudy or sunny. The probability of a day being cloudy is , independent of the condition on other days. What is the probability that in any given four days, there will be three cloudy days and one sunny day?
The values of Stock and Stock on a particular day are Rs. and Rs. , respectively. An investor invests Rs. in Stock and Rs. in Stock . He sells all the stocks the next day when the value of Stock is Rs. and Stock is Rs. . The profit made by …
