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 segment of C-code: int j, n; j = 1; while (j <= n) j = j * 2; The number of comparisons made in the execution of the loop for any is:
Consider the following program segment. Here and are the general purpose registers. …
Consider the following program segment. Here and are the general purpose registers. …
Suppose the letters have probabilities , respectively. What is the average length of the Huffman code for the letters ?
Consider the following Finite State Automaton: The minimum state automaton equivalent to the above FSA has the following number of states:
Consider the CFG with as the non-terminal alphabet, as the terminal alphabet, as the start symbol and the following set of production rules: For …
A process, has been allocated page frames. Assume that none of the pages of the process are available in the memory initially. The process makes the following sequence of page references (reference string): Least Recently Used (LRU) page replacement policy is a practical approximation to optimal page replacement. For …
Consider a machine with a byte addressable main memory of bytes. Assume that a direct mapped data cache consisting of lines of bytes each is used in the system. A x two-dimensional array of bytes is stored in the main memory starting from memory location . Assume that the data cache is initially empty. The …
Suppose that a robot is placed on the Cartesian plane. At each step it is allowed to move either one unit up or one unit right, i.e., if it is at then it can move to either or . Suppose that the robot is not allowed to traverse the line segment from to . With this constraint, how many distinct paths …
Consider the DAG with shown below. Which of the following is not a topological ordering?
Information about a collection of students is given by the relation . The relation gives which student has enrolled for (or taken) what course(s). Assume that every course is taken by at least one male and at least one female student. What …
Suppose that a robot is placed on the Cartesian plane. At each step it is allowed to move either one unit up or one unit right, i.e., if it is at then it can move to either or . How many distinct paths are there for the robot to reach the point starting from the initial position ?
A process has been allocated page frames. Assume that none of the pages of the process are available in the memory initially. The process makes the following sequence of page references (reference string): If optimal page replacement policy is used, how many page faults occur for the above reference string?
Consider the CFG with as the non-terminal alphabet, as the terminal alphabet, as the start symbol and the following set of production rules: Which …
Suppose the letters have probabilities , respectively. Which of the following is the Huffman code for the letter ?
Consider a machine with a byte addressable main memory of bytes. Assume that a direct mapped data cache consisting of lines of bytes each is used in the system. A two-dimensional array of bytes is stored in the main memory starting from memory location . Assume that the data cache is initially empty. The …
Consider the following Finite State Automaton: The language accepted by this automaton is given by the regular expression
Consider the following program segment. Here and are the general purpose registers. …
Match the following: …
The distance between two stations and is kilometers. All frames are bits long. The propagation delay per kilometer is seconds. Let bits/second be the channel capacity. Assuming that the processing delay is negligible, the number of bits for the sequence number field in a frame for maximum utilization, …
