Skip to content

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
Official PYQ2023Engineering MathematicsCalculus: Limits, Continuity, DifferentiabilityNAT · 1 mark
The value of the definite integral ∫−33∫−22∫−11(4x2y−z3)dz dy dx\int_{-3}^{3} \int_{-2}^{2} \int_{-1}^{1}\left(4 x^{2} y-z^{3}\right) \mathrm{d} z \mathrm{~d} y \mathrm{~d} x is _________. (Rounded off to the nearest integer)
Official PYQ2023Digital LogicNumber Representations (Fixed and Floating Point)NAT · 1 mark
A particular number is written as 132132 in radix-44 representation. The same number in radix-55 representation is _____________.
Official PYQ2023Computer Organization and ArchitectureInstruction PipeliningNAT · 1 mark
Consider a 33-stage pipelined processor having a delay of 10 ns10 \mathrm{~ns} (nanoseconds), 20 ns20 \mathrm{~ns}, and 14 ns,14 \mathrm{~ns}, 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 …
Official PYQ2023Computer Organization and ArchitectureI/O Interface: Interrupt and DMA ModeNAT · 1 mark
A keyboard connected to a computer is used at a rate of 11 keystroke per second. The computer system polls the keyboard every 10 ms10 \mathrm{~ms} (milli seconds) to check for a keystroke and consumes 100  μs100\; \mu \mathrm{s} (micro seconds) for each poll. If it is determined after polling that a key has been pressed, the system consumes an additional …
Official PYQ2023Programming and Data StructuresProgramming in CNAT · 1 mark
The integer value printed by the ANSI-C\textsf{ANSI-C} 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; }
Official PYQ2023Compiler DesignRuntime EnvironmentsMCQ · 2 marks
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?
Official PYQ2023Compiler DesignData Flow Analyses: Constant Propagation, Liveness, CSEMCQ · 2 marks
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?
Official PYQ2023Operating SystemConcurrency and SynchronizationMCQ · 2 marks
Consider the two functions incr\textsf{incr} and decr\textsf{decr} shown below. incr(){ decr(){ wait(s); wait(s); X = X+1; X = X-1; signal(s); signal(s); } } There are 55 threads each invoking incr\textsf{incr} once, and 33 threads each invoking decr\textsf{decr} once, on the same shared variable X\mathrm{X}. The initial value of X\mathrm{X} is …
Official PYQ2023Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 2 marks
Consider the context-free grammar GG below S→aSb∣XX→aX∣Xb∣a∣b,\begin{array}{l} S \rightarrow a S b \mid X \\ X \rightarrow a X \mid X b \mid a \mid b, \end{array} where SS and XX are non-terminals, and aa and bb are terminal symbols. The starting non-terminal is SS. Which one of the following statements is CORRECT?\text{CORRECT}?
Official PYQ2023Theory of ComputationContext-free Grammars and Push-down AutomataMCQ · 2 marks
Consider the pushdown automaton (PDA)  P\text{(PDA)}\;P below, which runs on the input alphabet {a,b}\{a, b\}, has stack alphabet {⊥,A}\{\perp, A\}, and has three states {s,p,q}\{s, p, q\}, with ss being the start state. A transition from state uu to state vv, labelled c/X/γc / X / \gamma, where cc is an input symbol or ϵ,X\epsilon, X is a stack symbol, …
Official PYQ2023Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 2 marks
Consider the given C\text{C}-code and its corresponding assembly code, with a few operands U1-U4\text{U1-U4} 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++) …
Official PYQ2023Digital LogicSequential CircuitsMCQ · 2 marks
Consider a sequential digital circuit consisting of T\mathrm{T} flip-flops and D\mathrm{D} flip-flops as shown in the figure. CLKIN\text{CLKIN} is the clock input to the circuit. At the beginning, Q1, Q2\text{Q1, Q2} and Q3\text{Q3} have values 0,10,1 and 1,1, respectively. Which one of the given values of (Q1, Q2, Q3)\text{(Q1, Q2, Q3)} can NEVER\text{NEVER} …
Official PYQ2023Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 2 marks
A 44 kilobyte (KB)\text{(KB)} byte-addressable memory is realized using four 1 KB1 \mathrm{~KB} memory blocks. Two input address lines (IA4 and IA3)\text{(IA4 and IA3)} are connected to the chip select (CS)\text{(CS)} port of these memory blocks through a decoder as shown in the figure. The remaining ten input address lines from IA11-IA0\text{IA11-IA0} are connected …
Official PYQ2023Digital LogicCombinational CircuitsMCQ · 2 marks
A Boolean digital circuit is composed using two 44-input multiplexers (M1 and M2)\text{(M1 and M2)} and one 22-input multiplexer (M3)\text{(M3)} as shown in the figure. X0-X7\text{X0-X7} are the inputs of the multiplexers M1 and M2\text{M1 and M2} and could be connected to either 00 or 1.1. The select lines of the multiplexers are connected to Boolean …
Official PYQ2023Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 2 marks
Consider the IEEE-754\textsf{IEEE-754} single precision floating point numbers P=0xC1800000\text{P} = \textsf{0xC1800000} and Q=0x3F5C2EF4.\text{Q} = \textsf{0x3F5C2EF4}. Which one of the following corresponds to the product of these numbers (i.e., P×Q),(\text{i.e., P} \times \mathrm{Q} ), represented in the IEEE-754\textsf{IEEE-754} single precision format?
Official PYQ2023Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsMCQ · 2 marks
Let U={1,2,…,n},U=\{1,2, \ldots, n\}, where nn is a large positive integer greater than 1000.1000. Let kk be a positive integer less than nn. Let A,BA, B be subsets of UU with ∣A∣=∣B∣=k|A|=|B|=k and A∩B=∅A \cap B=\emptyset. We say that a permutation of UU separates AA from BB if one of the following is true. All members of AA appear in the …
Official PYQ2023Programming and Data StructuresBinary HeapsMCQ · 2 marks
Let AA be a priority queue for maintaining a set of elements. Suppose AA is implemented using a max-heap data structure. The operation EXTRACT-MAX(A)\text{EXTRACT-MAX} (A) extracts and deletes the maximum element from AA. The operation INSERT⁡(A,key)\operatorname{INSERT}(A, key ) inserts a new element keykey in AA. The properties of a max-heap are preserved at the …
Official PYQ2023Programming and Data StructuresTreesMCQ · 2 marks
Consider the C\text{C} function foo\text{foo} 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 foo\textsf{foo} is called with a pointer to the …
Official PYQ2023Engineering MathematicsSets, Relations and FunctionsMSQ · 2 marks
Let f:A→Bf: A \rightarrow B be an onto (or surjective) function, where AA and BB are nonempty sets. Define an equivalence relation ∼\sim on the set AA as a1∼a2 if f(a1)=f(a2),a_{1} \sim a_{2} \text{ if } f\left(a_{1}\right)=f\left(a_{2}\right), where a1,a2∈Aa_{1}, a_{2} \in A. Let E={[x]:x∈A}\mathcal{E}=\{[x]: x \in A\} be the set of all the equivalence classes under …
Official PYQ2023Engineering MathematicsMonoids and GroupsMSQ · 2 marks
Let XX be a set and 2X2^{X} denote the powerset of XX. Define a binary operation Δ\Delta on 2X2^{X} as follows: AΔB=(A−B)∪(B−A). A \Delta B=(A-B) \cup(B-A) \text{. } Let H=(2X,Δ)H=\left(2^{X}, \Delta\right). Which of the following statements about HH is/are correct?