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 PYQ2014Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
The value of a float\text{float} type variable is represented using the single-precision 32-bit\text{32-bit} floating point format of IEEE-754\text{IEEE-754} standard that uses 11 bit\text{bit} for sign, 8 bits\text{8 bits} for biased exponent and 23 bits\text{23 bits} for the mantissa. A float\text{float} type variable XX is assigned the decimal value of …
Official PYQ2014Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
If the associativity of a processor cache is doubled while keeping the capacity and block size unchanged, which one of the following is guaranteed to be NOT affected?
Official PYQ2014Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
In designing a computer's cache system, the cache block (or cache line) size is an important parameter. Which one of the following statements is correct in this context?
Official PYQ2014Programming and Data StructuresProgramming in CMCQ · 1 mark
Consider the C function given below. int f(int j) { static int i = 50; int k; if (i == j) { printf("something"); k = f(i); return 0; } else return 0; } Which one of the following is TRUE?
Official PYQ2014Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
Suppose a stack implementation supports an instruction REVERSE\text{REVERSE}, which reverses the order of elements on the stack, in addition to the PUSH\text{PUSH} and POP\text{POP} instructions. Which one of the following statements is TRUE\text{TRUE} (with respect to this modified stack)?
Official PYQ2014Programming and Data StructuresRecursionNAT · 1 mark
Consider the following function. double f(double x){ if( abs(x*x - 3) < 0.01) return x; else return f(x/2 + 1.5/x); } Give a value qq (to 22 decimals) such that f(q)f(q) will return qq:_____.
Official PYQ2014Compiler DesignSyntax-directed TranslationNAT · 1 mark
Consider the expression tree shown. Each leaf represents a numerical value, which can either be 00 or 11. Over all possible choices of the values at the leaves, the maximum possible value of the expression represented by the tree is ___.
Official PYQ2014AlgorithmsSearching, Sorting, HashingNAT · 1 mark
Suppose P,Q,R,S,TP, Q, R, S, T are sorted sequences having lengths 20,24,30,35,5020, 24, 30, 35, 50 respectively. They are to be merged into a single sequence by merging together two sequences at a time. The number of comparisons that will be needed in the worst case by the optimal algorithm for doing this is ____.
Official PYQ2014AlgorithmsAlgorithm Design: Dynamic ProgrammingNAT · 1 mark
Consider two strings AA = "qpqrr" and BB = "pqprqrp". Let xx be the length of the longest common subsequence (not necessarily contiguous) between AA and BB and let yy be the number of such longest common subsequences between AA and BB. Then x+10y=x +10y= ___.
Official PYQ2014Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Let L1={w∈{0,1}∗∣wL_1=\{w\in\{0,1\}^*\mid w  has at least as many occurrences of \text{ has at least as many occurrences of } (110)′s as (110)'\text{s as } (011)′s}(011)'\text{s} \}. Let L2={w∈{0,1}∗ ∣wL_2=\{w \in\{0,1\}^*\ \mid w  has at least as many occurrences of \text{ has at least as many occurrences of } (000)′s as(000)'\text{s as} (111)′s}(111)'\text{s} \}. Which one of the following is TRUE?
Official PYQ2014Theory of ComputationUndecidabilityMCQ · 1 mark
Let ⟨M⟩\langle M \rangle be the encoding of a Turing machine as a string over Σ={0,1}\Sigma=\left\{0,1\right\}. Let L={⟨M⟩∣M is a Turing machine that accepts a string of length 2014}.L=\left\{\langle M \rangle \mid M \text{ is a Turing machine}\\\text{ that accepts a string of length 2014} \right\}. Then LL is:
Official PYQ2014Compiler DesignIntermediate Code GenerationMCQ · 1 mark
For a C program accessing X[i][j][k]\mathbf{X[i] [j] [k]}, the following intermediate code is generated by a compiler. Assume that the size of an integer is 3232 bits and the size of a character is 88 bits. t0 = i ∗ 1024 t1 = j ∗ 32 t2 = k ∗ 4 t3 = t1 + t0 t4 = t3 + t2 t5 = X[t4] Which one of the following statements about the source code for the C program is …
Official PYQ2014Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
A computer has twenty physical page frames which contain pages numbered 101101 through 120120. Now a program accesses the pages numbered 1, 2, ..., 100\text{1, 2, ..., 100} in that order, and repeats the access sequence THRICE. Which one of the following page replacement policies experiences the same number of page faults as the optimal page replacement policy for …
Official PYQ2014Operating SystemCPU SchedulingNAT · 1 mark
Three processes AA, BB and CC each execute a loop of 100100 iterations. In each iteration of the loop, a process performs a single computation that requires tct_c CPU milliseconds and then initiates a single I/O operation that lasts for tiot_{io} milliseconds. It is assumed that the computer where the processes execute has sufficient number of …
Official PYQ2014Operating SystemConcurrency and SynchronizationMCQ · 1 mark
Consider the procedure below for the Producer-Consumer problem which uses semaphores: semaphore n = 0; semaphore s = 1; void producer() { while(true) { produce(); semWait(s); addToBuffer(); semSignal(s); semSignal(n); } } void consumer() { while(true) { semWait(s); semWait(n); removeFromBuffer(); semSignal(s); consume(); } } Which one of the following is …
Official PYQ2014DatabasesNormal FormsMCQ · 1 mark
Consider a join (relation algebra) between relations r(R)r(R) and s(S)s(S) using the nested loop method. There are 33 buffers each of size equal to disk block size, out of which one buffer is reserved for intermediate results. Assuming size(r(R))<size(s(S)),\text{size}(r(R))<\text{size}(s(S)), the join will have fewer number of disk block accesses if
Official PYQ2014DatabasesTransactions and Concurrency ControlMCQ · 1 mark
Consider the following schedule S of transactions T1,T2,T3,T4:T1, T2, T3, T4: …
Official PYQ2014Web Technologies (Historical)MCQ · 1 mark
A graphical HTML browser resident at a network client machine QQ accesses a static HTML webpage from a HTTP server SS. The static HTML page has exactly one static embedded image which is also at SS. Assuming no caching, which one of the following is correct about the HTML webpage loading (including the embedded image)?
Official PYQ2014Computer NetworksRouting Protocols: Shortest Path, Flooding, Distance Vector, Link StateMCQ · 1 mark
An IP machine QQ has a path to another IP machine HIP\ machine\ H via three IP routers R1,R2,IP\ routers \ R1, R2, and R3R3. Q−R1−R2−R3−HQ-R1-R2-R3-H HH acts as an HTTP server\text{HTTP}\ server, and QQ connects to HH via HTTP\text{HTTP} and downloads a file. Session layer encryption is used, with DES\text{DES} as the shared key encryption protocol. Consider the following four …
Official PYQ2014Computer NetworksPacket, Circuit and Virtual Circuit SwitchingMCQ · 1 mark
Consider the store and forward packet switched network given below. Assume that the bandwidth of each link is 10610^6 bytes / sec. A user on host AA sends a file of size 10310^3 bytes to host BB through routers R1R1 and R2R2 in three different ways. In the first case a single packet containing the complete file is transmitted from AA to BB. …