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 PYQ2001Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following program Program P2 var n : int; procedure W(var x : int) begin x = x + 1; print x; end procedure D begin var n : int; n = 3; W(n); end begin \\begin P2 n=10; D; end If the language has dynamic scooping and parameters are passed by reference, what will be printed by the program?
Official PYQ2001Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the following three C functions: [P1][P1] int *g(void) { int x = 10; return (&x); } [P2][P2] int *g(void) { int *px; *px = 10; return px; } [P3][P3] int *g(void) { int *px; px = (int*) malloc (sizeof(int)); *px = 10; return px; } Which of the above three functions are likely to cause problems with pointers?
Official PYQ2001Programming and Data StructuresProgramming in CMCQ · 1 mark
What is printed by the print statements in the program P1P1 assuming call by reference parameter passing? Program P1() { x = 10; y = 3; func1(y,x,x); print x; print y; } func1(x,y,z) { y = y + 4; z = x + y + z }
Official PYQ2001Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
What is the minimum number of stacks of size nn required to implement a queue of size nn?
Official PYQ2001Engineering MathematicsGraphs: Connectivity, Matching, ColouringMCQ · 1 mark
How many undirected graphs (not necessarily connected) can be constructed out of a given set V={v1,v2,…vn}V=\{v_1, v_2, \dots v_n\} of nn vertices?
Official PYQ2001AlgorithmsGraph Traversals (BFS, DFS)MCQ · 1 mark
Consider an undirected, unweighted graph GG. Let a breadth-first traversal of GG be done starting from a node rr. Let d(r,u)d(r,u) and d(r,v)d(r,v) be the lengths of the shortest paths from rr to uu and vv respectively in GG. If uu is visited before vv during the breadth-first traversal, which of the following statements is correct?
Official PYQ2001Computer Organization and ArchitectureALU, Data-path and Control UnitMCQ · 1 mark
Consider the following data path of a simple non-pipelined CPU. The registers A,BA, B, A1,A2,MDR,A_{1},A_{2}, \textsf{MDR}, the bus\textsf{bus} and the ALU\textsf{ALU} are 88-bitbit wide. SP\textsf{SP} and MAR\textsf{MAR} are 1616-bitbit registers. The MUX\textsf{MUX} is of size 8×(2:1)8 \times (2:1) and the DEMUX\textsf{DEMUX} is of size …
Official PYQ2001Digital LogicSequential CircuitsMCQ · 1 mark
Consider the circuit given below with initial state Q0=1,Q1=Q2=0Q_0=1, Q_1=Q_2=0. The state of the circuit is given by the value 4Q2+2Q1+Q04Q_2+2Q_1+Q_0 Which one of the following is correct state sequence of the circuit?
Official PYQ2001Digital LogicCombinational CircuitsMCQ · 1 mark
Consider the circuit shown below. The output of a 2:12:1 MUX is given by the function (ac′+bc)(ac' + bc). Which of the following is true?
Official PYQ2001Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
The 2′s2's complement representation of (-539)10 in hexadecimal is
Official PYQ2001Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 1 mark
Which is the most appropriate match for the items in the first column with the items in the second column: …
Official PYQ2001Digital LogicCombinational CircuitsMCQ · 1 mark
Consider the following circuit with initial state Q0=Q1=0Q_0 = Q_1 = 0. The D Flip-flops are positive edged triggered and have set up times 20 nanosecond and hold times 0.0. Consider the following timing diagrams of X and C. The clock period of C≥40C \geq 40 nanosecond. Which one is the correct plot of Y?
Official PYQ2001Theory of ComputationUndecidabilityMCQ · 1 mark
Consider the following problem XX. Given a Turing machine MM over the input alphabet Σ\Sigma, any state qq of MM and a word w∈Σ∗w \in \Sigma^*, does the computation of MM on ww visit the state of qq? Which of the following statements about XX is correct?
Official PYQ2001Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Consider the following languages: L1={ww∣w∈{a,b}∗}L1=\left\{ww \mid w \in \{a,b\}^*\right\} L2={wwR∣w∈{a,b}∗,wR is the reverse of w}L2=\left\{ww^R \mid w \in \{a,b\}^*, w^R \text{ is the reverse of w} \right\} L3={02i∣ i is an integer}L3=\left\{0^{2i} \mid \text{ i is an integer} \right\} L4={0i2∣ i is an integer}L4= \left\{ 0^{i^2} \mid \text{ i is an integer} \right\} Which of the languages are regular?
Official PYQ2001Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider a DFA over Σ={a,b}\Sigma=\{a,b\} accepting all strings which have number of a's divisible by 66 and number of bb's divisible by 88. What is the minimum number of states that the DFA will have?
Official PYQ2001Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
Let f:A→Bf: A \rightarrow B a function, and let E and F be subsets of AA. Consider the following statements about images. S1:f(E∪F)=f(E)∪f(F)S_1: f(E \cup F) = f(E) \cup f(F) S2:f(E∩F)=f(E)∩f(F)S_2: f(E \cap F)=f(E) \cap f(F) Which of the following is true about S1 and S2?
Official PYQ2001Engineering MathematicsCombinatorics: Counting, Recurrence Relations, Generating FunctionsMCQ · 1 mark
How many 44-digit even numbers have all 44 digits distinct?
Official PYQ2001Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
Consider the following statements: S1:S_1: There exists infinite sets AA, BB, CC such that A∩(B∪C)A \cap (B \cup C) is finite. S2:S_2: There exists two irrational numbers xx and y such that (x+y)(x+y) is rational. Which of the following is true about S1S_1 and S2S_2?
Official PYQ2001DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Let r and s be two relations over the relation schemes R and S respectively, and let A be an attribute in R. The relational algebra expression σA=a(r⋈s)\sigma_{A=a}(r \bowtie s) is always equal to
Official PYQ2001Operating SystemI/O SchedulingMCQ · 1 mark
Which of the following requires a device driver?