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 partial implementation of a counter using flip-flops following the sequence as shown below. To complete the circuit, the input should be
Consider a multiplexer with and as data inputs and the as the control input. selects input , and selects input . What are the connections required to realize the 2-variable Boolean function , without using any additional hardware?
Which are the essential prime implicants of the following Boolean function?
A circuit outputs a digit in the form of bits. is represented by by by . A combinational circuit is to be designed which takes these bits as input and outputs if the digit , and otherwise. If only and gates may be used, what is …
The routing table of a router is shown below: …
Consider three IP networks and . Host in network sends messages each containing bytes of application data to a host in network . The layer prefixes byte header to the message. This passes through an intermediate network .The maximum packet size, including byte IP header, in …
and are the only two stations on an Ethernet. Each has a steady queue of frames to send. Both and attempt to transmit a frame, collide, and wins the first backoff race. At the end of this successful transmission by , both and attempt to transmit and collide. The probability that wins the second backoff …
The employee information in a company is stored in the relation Employee (name, sex, salary, deptName) Consider the following SQL query Select deptName From Employee Where sex = ‘M’ Group by deptName Having avg(salary) > (select avg (salary) from Employee) It returns the names of the department in which
The order of an internal node in a tree index is the maximum number of children it can have. Suppose that a child pointer takes bytes, the search field value takes bytes, and the block size is bytes. What is the order of the internal node?
Consider the relation Student (name, sex, marks), where the primary key is shown underlined, pertaining to students in a class that has at least one boy and one girl. What does the following relational algebra expression produce? (Note: is the rename operator). …
The relation scheme has the following functional dependencies: name, courseNo, grade rollNo, courseNo grade name rollNo rollNo name The highest normal form of this relation scheme is
A unix-style I-nodes has direct pointers and one single, one double and one triple indirect pointers. Disk block size is Kbyte, disk block address is bits, and -bit integers are used. What is the maximum possible file size?
Consider the following set of processes, with the arrival times and the CPU-burst times gives in milliseconds. …
Consider the grammar with the following translation rules and as the start symbol …
Consider two processes and accessing the shared variables and protected by two binary semaphores and respectively, both initialized to 1. and denote the usual semaphore operators, where decrements the semaphore value, and increments the semaphore value. The pseudo-code of and …
Suppose we run Dijkstra’s single source shortest path algorithm on the following edge-weighted directed graph with vertex as the source. In what order do the nodes get included into the set of vertices for which the shortest path distances are finalized?
Consider the following C program segment struct CellNode{ struct CellNode *leftChild int element; struct CellNode *rightChild; }; int Dosomething (struct CellNode *ptr) { int value = 0; if(ptr != NULL) { if (ptr -> leftChild != NULL) value = 1 + DoSomething (ptr -> leftChild); if (ptr -> rightChild != NULL) value = max(value, 1 + Dosomething (ptr …
Consider the following C program main() { int x, y, m, n; scanf("%d %d", &x, &y); /* Assume x>0 and y>0*/ m = x; n = y; while(m != n) { if (m > n) m = m-n; else n = n-m; } printf("%d", n); } The program computes
Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among will be the slowest?
What does the following algorithm approximate? (Assume ). x = m; y = 1; While (x-y > ϵ) { x = (x+y)/2; y = m/x; } print(x);
