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
Host A (on TCP/IP v4 network A) sends an IP datagram D to host B (also on TCP/IP v4 network B). Assume that no error occurred during the transmission of D. When D reaches B, which of the following IP header field(s) may be different from that of the original datagram D? TTL Checksum Fragment Offset
A bit-stuffing based framing protocol uses an delimiter pattern of If the output bit-string after stuffing is then the input bit-string is:
In the following pairs of OSI protocol layer/sub-layer and its functionality, the INCORRECT pair is
A prime attribute of a relation scheme is an attribute that appears
What is the optimized version of the relation algebra expression , where are sets of attributes in with and are Boolean expressions based on the attributes in ?
A system uses page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below?
In the context of modular software design, which one of the following combinations is desirable?
One of the purposes of using intermediate code in compilers is to
Which of the following statements are CORRECT? Static allocation of all data areas by a compiler makes it impossible to implement recursion. Automatic garbage collection is essential to implement recursion. Dynamic allocation of activation records is essential to implement recursion. Both heap and stack are essential to implement recursion.
Let be a finite non-empty alphabet and let be the power set of . Which one of the following is TRUE?
The length of the shortest string NOT in the language (over of the following regular expression is _______.
You have an array of elements. Suppose you implement quicksort by always choosing the central element of the array as the pivot. Then the tightest upper bound for the worst case performance is
Suppose depth first search is executed on the graph below starting at some unknown vertex. Assume that a recursive call to visit a vertex is made only after first checking that the vertex has not been visited earlier. Then the maximum possible recursion depth (including the initial call) is _________.
Consider the following rooted tree with the vertex labeled as the root: The order in which the nodes are visited during an in-order traversal of the tree is
The minimum number of arithmetic operations required to evaluate the polynomial for a given value of , using only one temporary variable is ______.
Let be the square matrix of size . Consider the following pseudocode. What is the expected output? C=100; for i=1 to n do for j=1 to n do { Temp = A[i][j]+C; A[i][j] = A[j][i]; A[j][i] = Temp -C; } for i=1 to n do for j=1 to n do output (A[i][j]);
Consider the following processors (ns stands for nanoseconds). Assume that the pipeline registers have zero latency. Four-stage pipeline with stage latencies . Four-stage pipeline with stage latencies . Five-stage pipeline with stage latencies …
Consider the following combinational function block involving four Boolean variables where are inputs and is the output. f(x, a, b, y) { if(x is 1) y = a; else y = b; } Which one of the following digital logic blocks is the most suitable for implementing this function?
Consider the following minterm expression for : The minterms , , and are 'do not care' terms. The minimal sum-of-products form for is
If , then the value of is equal to ______.
