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
Let be a recursive language and be a recursively enumerable but not recursive language. Let and be two languages such that reduces to , and reduces to (reduction means the standard many-one reduction). Which one of the following statements is TRUE?
Consider the following proposed solution for the critical section problem. There are processes : . In the code, function returns an integer not smaller than any of its arguments .For all is initialized to zero. Code for ; do { c[i]=1; t[i]= pmax (t[0],....,t[n-1])+1; c[i]=0; for every j != i in …
A function , defined on the set of positive integers , satisfies the following properties: if is even if is odd Let be the set of distinct values that takes. The maximum possible size of is ___________.
Cylinder a disk queue with requests for to blocks on cylinders The C-LOOK scheduling algorithm is used. The head is initially at cylinder number , moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from to . The total head movement (in number of cylinders) …
Consider the recurrence relation . Let . The value of is __________.
An IP datagram of size arrives at a router. The router has to forward this packet on a link whose MTU (maximum transmission unit) is . Assume that the size of the IP header is The number of fragments that the IP datagram will be divided into for transmission is________.
Consider a computer system with ten physical page frames. The system is provided with an access sequence , where each is a distinct virtual page number. The difference in the number of page faults between the last-in-first-out page replacement policy and the optimal page replacement policy …
Consider the following experiment. Step 1. Flip a fair coin twice. Step 2. If the outcomes are (TAILS, HEADS) then output and stop. Step 3. If the outcomes are either (HEADS, HEADS) or (HEADS, TAILS), then output and stop. Step 4. If the outcomes are (TAILS, TAILS), then go to Step The probability that the output of the experiment is …
An operator delete for a binary heap data structure is to be designed to delete the item in the -th node. Assume that the heap is implemented in an array and refers to the -th index of the array. If the heap tree has depth (number of edges on the path from the root to the farthest leaf ), then what is the time complexity to …
Consider the following context-free grammars; Which one of the following pairs of languages is generated by and ,respectively?
The following function computes the maximum value contained in an integer array of size . int max (int *p,int n) { int a = 0, b=n-1; while (__________) { if (p[a]<= p[b]) {a = a+1;} else {b = b-1;} } return p[a]; } The missing loop condition is:
Consider the following two phase locking protocol. Suppose a transaction accesses (for read or write operations), a certain set of objects . This is done in the following manner: . acquires exclusive locks to in increasing order of their addresses. . The required …
What will be the output of the following pseudo-code when parameters are passed by reference and dynamic scoping is assumed? a = 3; void n(x) { x = x * a; print (x); } void m(y) { a = 1 ; a = y - a; n(a); print (a); } void main () { m(a); }
Consider the following Syntax Directed Translation Scheme , with non-terminals and terminals . Using the above , the output printed by a bottom-up parser, for the input is:
The size of the data count register of a controller is . The processor needs to transfer a file of kilobytes from disk to main memory. The memory is byte addressable. The minimum number of times the controller needs to get the control of the system bus from the processor to transfer the file from …
The attribute of three arithmetic operators in some programming language are given below. …
A sender uses the Stop-and-Wait protocol for reliable transmission of frames. Frames are of size bytes and the transmission rate at the sender is Size of an acknowledgment is bytes and the transmission rate at the receiver is The one-way …
Consider that wants to send a message that is digitally signed to . Let the pair of private and public keys for and be denoted by and for , respectively. Let represent the operation of encrypting with a key and represent the message digest. Which one of …
The coefficient of in is ___________.
The stage delays in a -stage pipeline are and picoseconds. The first stage (with delay picoseconds) is replaced with a functionality equivalent design involving two stages with respective delays and picoseconds. The throughput increase of the pipeline is ___________ percent.
