Skip to content

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
Official PYQ2009Software Engineering (Historical)MCQ · 1 mark
Consider the following statements about the cyclomatic complexity of the control flow graph of a program module. Which of these are TRUE? The cyclomatic complexity of a module is equal to the maximum number of linearly independent circuits in the graph. The cyclomatic complexity of a module is the number of decisions in the module plus one, where a decision …
Official PYQ2009Operating SystemI/O SchedulingMCQ · 1 mark
A hard disk has 6363 sectors per track, 1010 platters each with 22 recording surfaces and 10001000 cylinders. The address of a sector is given as a triple ⟨c,h,s⟩\langle c, h, s \rangle, where cc is the cylinder number, hh is the surface number and ss is the sector number. Thus, the 0th^{th} sector is addresses as ⟨0,0,0⟩\langle 0, 0, 0 \rangle, …
Official PYQ2009Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 1 mark
Let G(x)G(x) be the generator polynomial used for CRC checking. What is the condition that should be satisfied by G(x)G(x) to detect odd number of bits in error?
Official PYQ2009Computer NetworksConcept of Layering: OSI and TCP/IP Protocol StacksMCQ · 1 mark
In the RSA public key cryptosystem, the private and public keys are (e,n)(e, n) and (d,n)(d, n) respectively, where n=p×qn=p \times q and pp and qq are large primes. Besides, nn is public and pp and qq are private. Let MM be an integer such that 0<M<n0<M<n and ϕ(n)=(p−1)(q−1)\phi(n) = (p-1)(q-1). Now consider the following equations. …
Official PYQ2009Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
While opening a TCPTCP connection, the initial sequence number is to be derived using a time-of-day (ToD) clock that keeps running even when the host is down. The low order 3232 bits of the counter of the ToD clock is to be used for the initial sequence numbers. The clock counter increments once per milliseconds. The maximum packet lifetime is given to be …
Official PYQ2009DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider two transactions T1T_1 and T2T_2, and four schedules S1,S2,S3,S4S_1, S_2, S_3, S_4, of T1T_1 and T2T_2 as given below: T1:R1[x]W1[x]W1[y]T_1: R_1[x]W_1[x]W_1[y] T2:R2[x]R2[y]W2[y]T_2: R_2[x]R_2[y]W_2[y] S1:R1[x]R2[x]R2[y]W1[x]W1[y]W2[y]S_1: R_1[x]R_2[x]R_2[y] W_1[x] W_1[y] W_2[y] S2:R1[x]R2[x]R2[y]W1[x]W2[y]W1[y]S_2: R_1[x]R_2[x]R_2[y] W_1[x] W_2[y] W_1[y] S3:R1[x]W1[x]R2[x]W1[y]R2[y]W2[y]S_3: R_1[x]W_1[x]R_2[x] W_1[y] R_2[y] W_2[y] …
Official PYQ2009DatabasesFile Organization and Indexing (B and B+ Trees)MCQ · 1 mark
The following key values are inserted into a B+B^+ - tree in which order of the internal nodes is 33, and that of the leaf nodes is 22, in the sequence given below. The order of internal nodes is the maximum number of tree pointers in each node, and the order of leaf nodes is the maximum number of data items that can be stored in it. The B+B^+ - …
Official PYQ2009DatabasesTuple Calculus and SQLMCQ · 1 mark
Let RR and SS be relational schemes such that R={a,b,c}R=\{a,b,c\} and S={c}.S=\{c\}. Now consider the following queries on the database: πR−S(r)−πR−S(πR−S(r)×s−πR−S,S(r))\pi_{R-S}(r) - \pi_{R-S} \left (\pi_{R-S} (r) \times s - \pi_{R-S,S}(r)\right ) …
Official PYQ2009Compiler DesignParsing (LL, LR)MCQ · 1 mark
Which of the following statements are TRUE? There exist parsing algorithms for some programming languages whose complexities are less than Θ(n3)\Theta(n^3) A programming language which allows recursion can be implemented with static storage allocation. No L-attributed definition can be evaluated in the framework of bottom-up parsing. Code improving …
Official PYQ2009Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
The above DFA accepts the set of all strings over {0,1}\{0,1\} that
Official PYQ2009Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Let L=L1∩L2L = L_1 \cap L_2, where L1L_1 and L2L_2 are languages as defined below: L1={ambmcanbn∣m,n≥0}L_1= \left \{ a^m b^mca^nb^n \mid m,n \geq 0 \right \} L2={aibjck∣i,j,k≥0}L_2=\left \{ a^i b^j c^k \mid i,j,k \geq 0 \right \} Then LL is
Official PYQ2009AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
In quick-sort, for sorting nn elements, the (n/4)th\left(n/4\right)^{th} smallest element is selected as pivot using an O(n)O(n) time algorithm. What is the worst case time complexity of the quick sort?
Official PYQ2009Programming and Data StructuresBinary Search TreesMCQ · 1 mark
What is the maximum height of any AVL-tree with 77 nodes? Assume that the height of a tree with a single node is 00.
Official PYQ2009AlgorithmsMinimum Spanning TreesMCQ · 1 mark
Consider the following graph: Which one of the following is NOT the sequence of edges added to the minimum spanning tree using Kruskal’s algorithm?
Official PYQ2009Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
The keys 12,18,13,2,3,23,512, 18, 13, 2, 3, 23, 5 and 1515 are inserted into an initially empty hash table of length 1010 using open addressing with hash function h(k)=kmod  10h(k) = k \mod 10 and linear probing. What is the resultant hash table?
Official PYQ2009AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
The running time of an algorithm is represented by the following recurrence relation: T(n)={nn≤3T(n3)+cn otherwise T(n) = \begin{cases} n & n \leq 3 \\ T(\frac{n}{3})+cn & \text{ otherwise } \end{cases} Which one of the following represents the time complexity of the algorithm?
Official PYQ2009Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address because
Official PYQ2009Operating SystemConcurrency and SynchronizationMCQ · 1 mark
The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows: void enter_CS(X) { while(test-and-set(X)); } void leave_CS(X) { X = 0; } In the above solution, XX is a memory location associated with the CSCS and is initialized to 00. Now consider the following statements: The …
Official PYQ2009Operating SystemCPU SchedulingMCQ · 1 mark
In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state: Now consider the following statements: If a process makes a transition DD, it would result in another process making transition AA immediately. A process P2P_2 in blocked state can make transition E while …
Official PYQ2009Operating SystemI/O SchedulingMCQ · 1 mark
Consider a disk system with 100100 cylinders. The requests to access the cylinders occur in following sequence: 4,34,10,7,19,73,2,15,6,204, 34, 10, 7, 19, 73, 2, 15, 6, 20 Assuming that the head is currently at cylinder 5050, what is the time taken to satisfy all requests if it takes 1  ms1\;\text{ms} to move from one cylinder to adjacent one and shortest seek time first …