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 software items: Program-, Control Flow Diagram of Program- and Control Flow Diagram of Program- as shown below The values of McCabe's Cyclomatic complexity of program-, program-, and program- respectively are
Consider the following C program: #include<stdio.h> int f1(void); int f2(void); int f3(void); int x=10; int main() { int x=1; x += f1() + f2 () + f3() + f2(); printf("%d", x); return 0; } int f1() { int x = 25; x++; return x;} int f2() { static int x = 50; x++; return x;} int f3() { x *= 10; return x;} The output of the program is ______.
Language is polynomial time reducible to language . Language is polynomial time reducible to language , which in turn polynomial time reducible to language . Which of the following is/are true? …
Consider the following policies for preventing deadlock in a system with mutually exclusive resources. Process should acquire all their resources at the beginning of execution. If any resource is not available, all resources acquired so far are released. The resources are numbered uniquely, and processes are allowed to request for resources only in …
Consider the following reservation table for a pipeline having three stages . …
The velocity (in kilometer/minute) of a motorbike which starts form rest, is given at fixed intervals of time (in minutes) as follows: t2468101214161820 v10182529322011520 The approximate distance (in kilometers) rounded to two places of decimals covered in 20 minutes using Simpson's rule is ________.
Suppose is an array of length , where all the entries are from the set . For any positive integers , consider the following pseudocode. DOSOMETHING (c, a, n) z ← 1 for i ← 0 to k-1 do z ← z² mod n if c[i]=1 then z ← (z × a) mod n return z If …
Consider the following C program: #include<stdio.h> int main() { int i, j, k = 0; j=2 * 3 / 4 + 2.0 / 5 + 8 / 5; k-=--j; for (i=0; i<5; i++) { switch(i+k) { case 1: case 2: printf("\n%d", i+k); case 3: printf("\n%d", i+k); default: printf("\n%d", i+k); } } return 0; } The number of times printf statement is executed is _______.
Consider the following code sequence having five instructions from . Each of these instructions has the following format. OP Ri, Rj, Rk Where operation OP is performed on contents of registers Rj and Rk and the result is stored in register Ri. : ADD R1, R2, R3 : MUL R7, R1, R3 : SUB R4, R1, R5 : ADD R3, R2, …
Consider a tree in which the search key is long, block size is , record pointer is long and the block pointer is long. The maximum number of keys that can be accommodated in each non-leaf node of the tree is ______.
If for non-zero where is
Given the function , where is a function in three Boolean variables and and , consider the following statements. Which of the following is true?
The total number of prime implicants of the function is __________
Let and , where is a positive integer. Which of the following statements is/are correct?
Let be a relation on the set of ordered pairs of positive integers such that if and only if . Which one of the following is true about ?
Let be a connected undirected graph of vertices and edges. The weight of a minimum spanning tree of is . When the weight of each edge of is increased by five, the weight of a minimum spanning tree becomes ______.
Consider the following recursive C function. void get(int n) { if (n<1) return; get (n-1); get (n-3); printf("%d", n); } If function is being called in then how many times will the function be invoked before returning to the ?
In the network , the octet (in decimal) of the last address of the network which can be assigned to a host is _______.
Suppose for are independent and identically distributed random variables whose probability mass functions are . Define another random variable , where denotes XOR. Then ______.
Two hosts are connected via a packet switch with bits per second links. Each link has a propagation delay of microseconds. The switch begins forwarding a packet microseconds after it receives the same. If bits of data are to be transmitted between the two hosts using a packet size of bits, the time elapsed between …
