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
Let be a directed, weighted graph with weight function . For some function , for each edge, define as . Which one of the options completes the following sentence so that it is TRUE? “The shortest paths in under are shortest …
An organization requires a range of IP address to assign one to each of its computers. The organization has approached an Internet Service Provider (ISP) for this task. The ISP uses CIDR and serves the requests from the available IP address space . The ISP wants to assign an address space to the organization which will minimize the …
In a balanced binary search tree with elements, what is the worst case time complexity of reporting all elements in range ? Assume that the number of reported elements is .
The number of permutations of the characters in LILAC so that no character appears in its original position, if the two L’s are indistinguishable, is ______.
Consider a non-pipelined processor operating at GHz. It takes clock cycles to complete an instruction. You are going to make a - stage pipeline out of this processor. Overheads associated with pipelining force you to operate the pipelined processor at GHz. In a given program, assume that are memory instructions, …
A processor has registers and uses -bit instruction format. It has two types of instructions: I-type and R-type. Each I-type instruction contains an opcode, a register name, and a -bit immediate value. Each R-type instruction contains an opcode and two register names. If there are distinct I-type opcodes, then the maximum number of …
For , let be a non-zero vector. Suppose that is chosen uniformly at random from . Then, the probability that is an odd number is______________
Consider the following C functions. int fun1(int n) { static int i= 0; if (n > 0) { ++i; fun1(n-1); } return (i); } int fun2(int n) { static int i= 0; if (n>0) { i = i+ fun1 (n) ; fun2(n-1) ; } return (i); } The return value of is _________
Consider the array representation of a binary min-heap containing elements. The minimum number of comparisons required to find the maximum in the heap is ___________.
Consider the following C functions. int tob (int b, int* arr) { int i; for (i = 0; b>0; i++) { if (b%2) arr [i] = 1; else arr[i] = 0; b = b/2; } return (i); } int pp(int a, int b) { int arr[20]; int i, tot = 1, ex, len; ex = a; len = tob(b, arr); for (i=0; i<len ; i++) { if (arr[i] ==1) tot = tot * ex; ex= ex*ex; } return (tot) ; } The value returned …
Consider a graph , where , , and weight of the edge is . The weight of minimum spanning tree of is _________
Consider the following set of processes, assumed to have arrived at time . Consider the CPU scheduling algorithms Shortest Job First (SJF) and Round Robin (RR). For RR, assume that the processes are scheduled in the order. …
Consider the following language. number of ’s in divisible by but not divisible by The minimum number of states in DFA that accepts is _________
Consider a paging system that uses -level page table residing in main memory and a for address translation. Each main memory access takes ns and lookup takes ns. Each page transfer to/from the disk takes ns. Assume that the hit ratio is , page fault rate is . …
Consider a database implemented using tree for file indexing and installed on a disk drive with block size of . The size of search key is and the size of tree/disk pointer is . Assume that the database has one million records. Also assume that no node of the tree and no records are present …
Graph is obtained by adding vertex to and making adjacent to every vertex of . The minimum number of colours required to edge-colour is _______
Consider a connection between a client and a server with the following specifications; the round trip time is ms, the size of the receiver advertised window is KB, slow-start threshold at the client is KB, and the maximum segment size is KB. The connection is established at time . Assume that there are no …
The expenditure on the project _____ as follows: equipment Rs. lakhs, salaries Rs. lakhs, and contingency Rs. lakhs.
The search engine’s business model ____ around the fulcrum of trust.
Ten friends planned to share equally the cost of buying a gift for their teacher. When two of them decided not to contribute, each of the other friends had to pay Rs. more. The cost of the gift was Rs. ____
