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 function implemented in C: void printxy(int x, int y) { int *ptr; x=0; ptr=&x; y=*ptr; *ptr=1; printf(“%d, %d”, x, y); } The output of invoking is:
Identify the language generated by the following grammar, where is the start variable.
Which of the following is/are shared by all the threads in a process? Program counter Stack Address space Registers
Consider the following tables and …
Consider socket API on a Linux machine that supports connected UDP sockets. A connected UDP socket is a UDP socket on which connect function has already been called. Which of the following statements is/are CORRECT? A connected UDP socket can be used to communicate with multiple peers simultaneously. A process can successfully call connect function again for …
The Breadth First Search (BFS) algorithm has been implemented using the queue data structure. Which one of the following is a possible order of visiting the nodes in the graph below?
Match the following: …
Consider the quadratic equation with coefficients in a base . The solutions of this equation in the same base are and . Then _____
The minimum possible number of states of a deterministic finite automaton that accepts the regular language = { | , } is ______________ .
An ER model of a database consists of entity types and . These are connected by a relationship which does not have its own attribute. Under which one of the following conditions, can the relational table for R be merged with that of A?
Match the algorithms with their time complexities: …
Let denote the statements ”It is raining”, “It is cold”, and “It is pleasant”, respectively. Then the statement “It is not raining and it is pleasant, and it is not pleasant only if it is raining and it is cold” is represented by
Let be any two context-free languages and be any regular language. Then which of the following is/are CORRECT? is context-free is context-free is context-free is context-free
Consider the transition diagram of a PDA given below with input alphabet and stack alphabet . is the initial stack symbol. Let denote the language accepted by the PDA Which one of the following is TRUE?
Consider the weighted undirected graph with vertices, where the weight of edge is given by the entry in the matrix . W= The largest possible integer value of , for which at least one …
is an undirected simple graph in which each edge has a distinct weight, and is a particular edge of . Which of the following statements about the minimum spanning trees of is/are TRUE? If is the lightest edge of some cycle in , then every MST of includes . If is the heaviest edge of some …
What will be the output of the following program? void count (int n) { static int d=1; printf ("%d",n); printf ("%d",d); d++; if (n>1) count (n-1); printf ("%d",d); } void main(){ count (3); }
Let be a complete undirected graph on vertices, having edges with weights being and . The maximum possible weight that a minimum weight spanning tree of can have is __________
Consider the two cascade to multiplexers as shown in the figure . The minimal sum of products form of the output is
For a host machine that uses the token bucket algorithm for congestion control, the token bucket has a capacity of and the maximum output rate is per . Tokens arrive at a rate to sustain output at a rate of per . The token bucket is currently …
