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 languages: Which one of the following is TRUE?
A binary relation on is defined as follows: if or . Consider the following propositions: is reflexive. is transitive. Which one of the following statements is TRUE?
Consider the following program: int f (int * p, int n) { if (n <= 1) return 0; else return max (f (p+1, n-1), p[0] - p[1]); } int main () { int a[] = {3, 5, 2, 6, 4}; printf(" %d", f(a, 5)); } Note: returns the maximum of and . The value printed by this program is ________.
Consider a processor with registers and an instruction set of size twelve. Each instruction has five distinct fields, namely, opcode, two source register identifiers, one destination register identifier, and twelve-bit immediate value. Each instruction must be stored in memory in a byte-aligned fashion. If a program has instructions, the …
Consider the following two-process synchronization solution. …
A student wrote two context-free grammars G1 and G2 for generating a single C-like array declaration. The dimension of the array is at least one. For example, int a[10] [3]; The grammars use D as the start symbol, and use six terminal symbols int ; id [ ] num. …
Consider the following New-order strategy for traversing a binary tree: Visit the root; Visit the right subtree using New-order; Visit the left subtree using New-order; The New-order traversal of the expression tree corresponding to the reverse polish expression 3 4 * 5 - 2 ^ 6 7 * 1 + - is given by:
Consider the following languages. , and , where …
Consider a set of different compounds in a chemistry lab. There is a subset of of compounds, each of which reacts with exactly compounds of . Consider the following statements: Each compound in U \ S reacts with an odd number of compounds. At least one compound in U \ S reacts with an odd number of compounds. Each …
Which one of the following grammars is free from left recursion?
For the protocol for wireless communication, which of the following statements is/are TRUE? At least three non-overlapping channels are available for transmissions. The RTS-CTS mechanism is used for collision detection. Unicast frames are ACKed.
A file system uses an in-memory cache to cache disk blocks. The miss rate of the cache is shown in the figure. The latency to read a block from the cache is ms and to read a block from the disk is ms. Assume that the cost of checking whether a block exists in the cache is negligible. Available cache sizes are in multiples of MB. The …
Consider the following two statements: If all states of an NFA are accepting states then the language accepted by the NFA is . There exists a regular language such that for all languages , is regular. Which one of the following is CORRECT?
Consider the following database schedule with two transactions and . Where denotes a read operation by transaction on a variable , denotes a write …
A network has a data transmission bandwidth of bits per second. It uses CSMA/CD in the MAC layer. The maximum signal propagation time from one node to another node is microseconds. The minimum size of a frame in the network is __________ bytes.
The value of the expression in the range to , is ________.
Let and be four matrices of dimensions and , respectively. The minimum number of scalar multiplications required to find the product using the basic matrix multiplication method is _________.
The number of ways in which the numbers can be inserted in an empty binary search tree, such that the resulting tree has height , is _________. Note: The height of a tree with a single node is .
A complete binary min-heap is made by including each integer in exactly once. The depth of a node in the heap is the length of the path from the root of the heap to that node. Thus, the root is at depth . The maximum depth at which integer can appear is _________.
Consider a (gigahertz) processor with a three stage pipeline and stage latencies and such that . If the longest pipeline stage is split into two pipeline stages of equal latency , the new frequency is __________ , ignoring delays in the …
