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
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?
Consider the following three C functions: int *g(void) { int x = 10; return (&x); } int *g(void) { int *px; *px = 10; return px; } 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?
What is printed by the print statements in the program 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 }
What is the minimum number of stacks of size required to implement a queue of size ?
How many undirected graphs (not necessarily connected) can be constructed out of a given set of vertices?
Consider an undirected, unweighted graph . Let a breadth-first traversal of be done starting from a node . Let and be the lengths of the shortest paths from to and respectively in . If is visited before during the breadth-first traversal, which of the following statements is correct?
Consider the following data path of a simple non-pipelined CPU. The registers , the and the are - wide. and are - registers. The is of size and the is of size …
Consider the circuit given below with initial state . The state of the circuit is given by the value Which one of the following is correct state sequence of the circuit?
Consider the circuit shown below. The output of a MUX is given by the function . Which of the following is true?
The complement representation of (-539)10 in hexadecimal is
Which is the most appropriate match for the items in the first column with the items in the second column: …
Consider the following circuit with initial state . The D Flip-flops are positive edged triggered and have set up times 20 nanosecond and hold times Consider the following timing diagrams of X and C. The clock period of nanosecond. Which one is the correct plot of Y?
Consider the following problem . Given a Turing machine over the input alphabet , any state of and a word , does the computation of on visit the state of ? Which of the following statements about is correct?
Consider the following languages: Which of the languages are regular?
Consider a DFA over accepting all strings which have number of a's divisible by and number of 's divisible by . What is the minimum number of states that the DFA will have?
Let a function, and let E and F be subsets of . Consider the following statements about images. Which of the following is true about S1 and S2?
How many -digit even numbers have all digits distinct?
Consider the following statements: There exists infinite sets , , such that is finite. There exists two irrational numbers and y such that is rational. Which of the following is true about and ?
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 is always equal to
Which of the following requires a device driver?
