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
The above synchronous sequential circuit built using JK flip-flops is initialized with . The state sequence for this circuit for the next clock cycles is
The memory access time is nanosecond for a read operation with a hit in cache, nanoseconds for a read operation with a miss in cache, nanoseconds for a write operation with a hit in cache and nanoseconds for a write operation with a miss in cache. Execution of a sequence of instructions involves instruction fetch operations, …
An instruction pipeline has five stages, namely, instruction fetch (IF), instruction decode and register fetch (ID/RF), instruction execution (EX), memory access (MEM), and register writeback (WB) with stage latencies ns, ns, ns, ns, and ns, respectively (ns stands for nanoseconds). To gain in terms of frequency, the …
Consider the C function given below. Assume that the array contains elements, sorted in ascending order. int ProcessArray(int *listA, int x, int n) { int i, j, k; i = 0; j = n-1; do { k = (i+j)/2; if (x <= listA[k]) j = k-1; if (listA[k] <= x) i = k+1; } while (i <= j); if (listA[k] == x) return(k); else return -1; } Which …
Consider the pseudocode given below. The function takes as argument a pointer to the root of an arbitrary tree represented by the representation. Each node of the tree is of type . typedef struct treeNode* treeptr; struct treeNode { treeptr leftMostChild, rightSibling; }; int DoSomething (treeptr …
Consider a hash table with slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first slots are unfilled after the first insertions?
Suppose we have a balanced binary search tree holding numbers. We are given two numbers and and wish to sum up all the numbers in that lie between and . Suppose there are such numbers in . If the tightest upper bound on the time to compute the sum is , the value of …
Consider the decision problem defined as follows: For example, is a Boolean formula and it is in . The decision problem is
Suppose you want to move from to on the number line. In each step, you either move right by a unit distance or you take a shortcut. A shortcut is simply a pre-specified pair of integers . Given a shortcut , if you are at position on the number line, you may directly move to . Suppose …
Consider the following languages over the alphabet Here, is the reverse of the string . Which of these languages are deterministic Context-free languages?
Which one of the following problems is undecidable?
Consider the basic block given below. a = b + c c = a + d d = b + c e = d - b a = e + b The minimum number of nodes and edges present in the DAG representation of the above basic block respectively are
Consider a paging hardware with a . Assume that the entire page table and all the pages are in the physical memory. It takes milliseconds to search the and milliseconds to access the physical memory. If the hit ratio is , the effective memory access time (in milliseconds) is _________.
An operating system uses shortest remaining time first scheduling algorithm for pre-emptive scheduling of processes. Consider the following set of processes with their arrival times and CPU burst times (in milliseconds): …
A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is _________.
Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation. employee (empId, empName, empAge) dependent (depId, eId, depName, depAge) Consider the following relational algebra query: …
Consider the transactions and the schedules given below. …
An router with a of bytes has received an packet of size with an header of length . The values of the relevant fields in the header of the third fragment generated by the router for this packet are:
Every host in an network has a resolution real-time clock with battery backup. Each host needs to generate up to unique identifiers per second. Assume that each host has a globally unique address. Design a globally unique ID for this purpose. After what period (in seconds) …
An IP router implementing Classless Inter-domain Routing (CIDR) receives a packet with address . The router's routing table has the following entries: …
