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
Compute
Consider the following two statements about database transaction schedules: Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable. Timestamp-ordering concurrency control protocol with Thomas’ Write Rule can generate view serializable schedules that are not conflict serializable Which of the above statements …
Let be an undirected complete graph on vertices, where . Then, the number of different Hamiltonian cycles in is equal to
Which one of the following statements is NOT correct about the tree data structure used for creating an index of a relational database table?
Which of the following protocol pairs can be used to send and retrieve e-mails (in that order)?
For , let us consider the regular language . Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for ?
The following C program is executed on a Unix/Linux system : #include<unistd.h> int main() { int i; for(i=0; i<10; i++) if(i%2 == 0) fork(); return 0; } The total number of child processes created is ________________ .
Consider the following C program : #include<stdio.h> int jumble(int x, int y){ x = 2*x+y; return x; } int main(){ int x=2, y=5; y=jumble(y,x); x=jumble(y,x); printf("%d \n",x); return 0; } The value printed by the program is ______________.
An array of distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to decimal places) is ________
The value of is _____
Two numbers are chosen independently and uniformly at random from the set The probability (rounded off to decimal places) that their (unsigned) binary representations have the same most significant bit is ___________.
Consider the following C program: #include <stdio.h> int main() { int arr[]={1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 5}, *ip=arr+4; printf(“%d\n”, ip[1]); return 0; } The number that will be displayed on execution of the program is _______
Consider three concurrent processes and as shown below, which access a shared variable that has been initialized to …
Consider a sequence of elements: . The sequence sum . Determine the maximum of , where . (Divide and conquer approach may be used.) Answer: ___________
Consider the following C function. void convert (int n ) { if (n<0) printf{“%d”, n); else { convert(n/2); printf(“%d”, n%2); } } Which one of the following will happen when the function convert is called with any positive integer as argument?
Consider the following C program: #include <stdio.h> int r() { static int num=7; return num--; } int main() { for (r();r();r()) printf(“%d”,r()); return 0; } Which one of the following values will be displayed on execution of the programs?
Consider three machines M, N, and P with IP addresses , and respectively. The subnet mask is set to for all the three machines. Which one of the following is true?
Suppose that in an IP-over-Ethernet network, a machine X wishes to find the MAC address of another machine Y in its subnet. Which one of the following techniques can be used for this?
Consider three -variable functions , and , which are expressed in sum-of-minterms as For the following circuit with one AND gate and one XOR gate the output function can be expressed as:
Which one of the following languages over is NOT context-free?
