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
The value of the definite integral is _________. (Rounded off to the nearest integer)
A particular number is written as in radix- representation. The same number in radix- representation is _____________.
Consider a -stage pipelined processor having a delay of (nanoseconds), , and for the first, second, and the third stages, respectively. Assume that there is no other delay and the processor does not suffer from any pipeline hazards. Also assume that one instruction is fetched every cycle. The …
A keyboard connected to a computer is used at a rate of keystroke per second. The computer system polls the keyboard every (milli seconds) to check for a keystroke and consumes (micro seconds) for each poll. If it is determined after polling that a key has been pressed, the system consumes an additional …
The integer value printed by the program given below is _______________ #include<stdio.h> int funcp(){ static int x = 1; x++; return x; } int main(){ int x,y; x = funcp(); y = funcp()+x; printf("%d\n", (x+y)); return 0; }
Consider the following program: int main() { f1 (); f2(2); f3(); return (0); } int f1 () { return(1); } int f2 (int X) { f3(); if (X==1); return f1 (); else return (X * f2 (X - 1)); } int f3 () { return (5); } Which one of the following options represents the activation tree corresponding to the main function?
Consider the control flow graph shown. Which one of the following choices correctly lists the set of live variables at the exit point of each basic block?
Consider the two functions and shown below. incr(){ decr(){ wait(s); wait(s); X = X+1; X = X-1; signal(s); signal(s); } } There are threads each invoking once, and threads each invoking once, on the same shared variable . The initial value of is …
Consider the context-free grammar below where and are non-terminals, and and are terminal symbols. The starting non-terminal is . Which one of the following statements is
Consider the pushdown automaton below, which runs on the input alphabet , has stack alphabet , and has three states , with being the start state. A transition from state to state , labelled , where is an input symbol or is a stack symbol, …
Consider the given -code and its corresponding assembly code, with a few operands being unknown. Some useful information as well as the semantics of each unique assembly instruction is annotated as inline comments in the code. The memory is byte-addressable. //C-code int a[10], b[10], i; // int is 32 bit for(i=0; i<10; i++) …
Consider a sequential digital circuit consisting of flip-flops and flip-flops as shown in the figure. is the clock input to the circuit. At the beginning, and have values and respectively. Which one of the given values of can …
A kilobyte byte-addressable memory is realized using four memory blocks. Two input address lines are connected to the chip select port of these memory blocks through a decoder as shown in the figure. The remaining ten input address lines from are connected …
A Boolean digital circuit is composed using two -input multiplexers and one -input multiplexer as shown in the figure. are the inputs of the multiplexers and could be connected to either or The select lines of the multiplexers are connected to Boolean …
Consider the single precision floating point numbers and Which one of the following corresponds to the product of these numbers represented in the single precision format?
Let where is a large positive integer greater than Let be a positive integer less than . Let be subsets of with and . We say that a permutation of separates from if one of the following is true. All members of appear in the …
Let be a priority queue for maintaining a set of elements. Suppose is implemented using a max-heap data structure. The operation extracts and deletes the maximum element from . The operation inserts a new element in . The properties of a max-heap are preserved at the …
Consider the function and the binary tree shown. typedef struct node { int val; struct node *left, *right; } node; int foo(node *p) { int retval; if (p == NULL) return 0; else { retval = p->val + foo(p->left) + foo(p->right); printf("%d ", retval); return retval; } } When is called with a pointer to the …
Let be an onto (or surjective) function, where and are nonempty sets. Define an equivalence relation on the set as where . Let be the set of all the equivalence classes under …
Let be a set and denote the powerset of . Define a binary operation on as follows: Let . Which of the following statements about is/are correct?
