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 expression grammar. The semantic rules for expression evaluation are stated next to each grammar production. …
We are given tasks . The execution of each task requires one unit of time. We can execute one task at a time. Each task has a profit and a deadline . Profit is earned if the task is completed before the end of the unit of time. …
double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } } Suppose we modify the above function and stores the value of , as and when they are computed. With this modification the time complexity for function is significantly …
Consider the following floating-point format. Mantissa is a pure fraction in sign-magnitude form. The normalized representation for the above format is specified as follows. The mantissa has an implicit preceding the binary (radix) point. Assume that only are padded in while shifting a field. The normalized representation of the above number …
Let and be two vertices in a undirected graph having distinct positive edge weights. Let be a partition of such that and . Consider the edge having the minimum weight amongst all those edges that have one vertex in and one vertex in . Let the weight of an edge denote the …
Consider the following data path of a The the bus and all the registers in the data path are of identical size. All operations including incrementation of the and the are to be carried out in the Two clock cycles are needed for memory read operation – the first one for loading …
Consider line number of the following C-program. int main() { /*Line 1 */ int I, N; /*Line 2 */ fro (I=0, I<N, I++); /*Line 3 */ } Identify the compiler’s response about this line while creating the object-module:
Consider the following floating-point format. Mantissa is a pure fraction in sign-magnitude form. The decimal number has the following hexadecimal representation (without normalization and rounding off):
We are given tasks . The execution of each task requires one unit of time. We can execute one task at a time. Each task has a profit and a deadline . Profit is earned if the task is completed before the end of the unit of time. …
Statement for Linked Answer Questions 83a & 83b: Consider the following expression grammar. The semantic rules for expression evaluation are stated next to each grammar production. …
Let and be two vertices in a undirected graph having distinct positive edge weights. Let be a partition of such that and . Consider the edge having the minimum weight amongst all those edges that have one vertex in and one vertex in . The edge must definitely belong to:
double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } } The space complexity of the above code is?
Consider the following data path of a The the bus and all the registers in the data path are of identical size. All operations including incrementation of the and the are to be carried out in the Two clock cycles are needed for memory read operation – the first one for loading …
Consider a relation scheme on which the following functional dependencies hold: {, , , }. What are the candidate keys R?
The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list? select title from book as B where (select count(*) from book as T where T.price>B.price) < 5
The following table has two attributes and where is the primary key and is the foreign key referencing with on-delete cascade. …
Let and be two entities in an diagram with simple-valued attributes. and are two relationships between and , where is one-to-many and is many-to-many. and do not have any attributes of their own. What is the minimum number of tables required to represent this situation in …
Suppose the round trip propagation delay for a Ethernet having jamming signal is . The minimum frame size is:
In a packet switching network, packets are routed from source to destination along a single path having two intermediate nodes. If the message size is bytes and each packet contains a header of bytes, then the optimum packet size is:
Suppose processes, share identical resource units, which can be reserved and released one at a time. The maximum resource requirement of process is , where . Which one of the following is a sufficient condition for ensuring that deadlock does not occur?
