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 PYQ2008AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Let xnx_n denote the number of binary strings of length nn that contain no consecutive 00s. Which of the following recurrences does xnx_n satisfy?
Official PYQ2008Computer Organization and ArchitectureInstruction PipeliningMCQ · 1 mark
Delayed branching can help in the handling of control hazards For all delayed conditional branch instructions, irrespective of whether the condition evaluates to true or false,
Official PYQ2008AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 1 mark
Consider the following C functions: int f1 (int n) { if(n == 0 || n == 1) return n; else return (2 * f1(n-1) + 3 * f1(n-2)); } int f2(int n) { int i; int X[N], Y[N], Z[N]; X[0] = Y[0] = Z[0] = 0; X[1] = 1; Y[1] = 2; Z[1] = 3; for(i = 2; i <= n; i++){ X[i] = Y[i-1] + Z[i-2]; Y[i] = 2 * X[i]; Z[i] = 3 * X[i]; } return X[n]; } The running time of f1(n)f1(n) …
Official PYQ2008Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
Consider a machine with a 22-way set associative data cache of size 64Kbytes64\text{Kbytes} and block size 16bytes16\text{bytes}. The cache is managed using 32  bit32\;\text{bit} virtual addresses and the page size is 4Kbytes4\text{Kbytes}. A program to be run on this machine begins as follows: double ARR[1024][1024]; int i, j; /*Initialize array ARR to 0.0 */ for(i = …
Official PYQ2008DatabasesNormal FormsMCQ · 1 mark
Consider the following relational schemes for a library database: Book (Title, Author, Catalog_no, Publisher, Year, Price) Collection(Title, Author, Catalog_no) with the following functional dependencies: Title Author → Catalog_no\text{Title Author }\rightarrow\text{ Catalog\_no} Catalog_no → Title Author Publisher Year\text{Catalog\_no }\rightarrow\text{ Title Author Publisher Year} …
Official PYQ2008DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Let R and S be two relations with the following schema R(P,Q‾,R1,R2,R3)R(\underline{P,Q}, R1, R2, R3) S(P,Q‾,S1,S2)S(\underline{P,Q}, S1, S2) where {P,Q}\left\{P, Q\right\} is the key for both schemas. Which of the following queries are equivalent? ΠP(R⋈S)\Pi_P \left(R \bowtie S\right) ΠP(R)⋈ΠP(S)\Pi_P \left(R\right) \bowtie \Pi_P\left(S\right) …
Official PYQ2008Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
A processor uses 3636 bit physical address and 3232 bit virtual addresses, with a page frame size of 44 Kbytes. Each page table entry is of size 44 bytes. A three level page table is used for virtual to physical address translation, where the virtual address is used as follows: Bits 30−3130-31 are used to index into the first level page table. Bits …
Official PYQ2008Operating SystemSystem CallsMCQ · 1 mark
A process executes the following code for(i=0; i<n; i++) fork(); The total number of child processes created is
Official PYQ2008Operating SystemDeadlockMCQ · 1 mark
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?
Official PYQ2008Computer Organization and ArchitectureI/O Interface: Interrupt and DMA ModeMCQ · 1 mark
Which of the following statements about synchronous and asynchronous I/O is NOT true?
Official PYQ2008Operating SystemConcurrency and SynchronizationMCQ · 1 mark
The PP and VV operations on counting semaphores, where s is a counting semaphore, are defined as follows: P(s):P(s): s=s−1;s=s-1; If s<0s < 0 then wait; V(s):V(s): s=s+1;s=s+1; If s≤0s \leq0 then wake up process waiting on s; Assume that PbP_b and VbV_b the wait and signal operations on binary semaphores are provided. Two binary semaphores xbx_b …
Official PYQ2008Programming and Data StructuresLinked ListsMCQ · 1 mark
The following C function takes a single-linked list of integers as a parameter and rearranges the elements of the list. The function is called with the list containing the integers 1,2,3,4,5,6,71, 2, 3, 4, 5, 6, 7 in the given order. What will be the contents of the list after function completes execution? struct node { int value; struct node *next; }; void …
Official PYQ2008Programming and Data StructuresProgramming in CMCQ · 1 mark
Choose the correct option to fill ?1?1 and ?2?2 so that the program below prints an input string in reverse order. Assume that the input string is terminated by a new line character. void reverse(void) { int c; if(?1) reverse(); ?2 } main() { printf("Enter text"); printf("\n"); reverse(); printf("\n"); }
Official PYQ2008Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
A computer on a 10Mbps10\text{Mbps} network is regulated by a token bucket. The token bucket is filled at a rate of 2Mbps2\text{Mbps}. It is initially filled to capacity with 16Megabits16\text{Megabits}. What is the maximum duration for which the computer can transmit at the full 10Mbps10\text{Mbps}?
Official PYQ2008Programming and Data StructuresProgramming in CMCQ · 1 mark
What is printed by the following C program? int f(int x, int *py, int **ppz) { int y, z; **ppz += 1; z = **ppz; // corrected z = *ppz; to z = **ppz; *py += 2; y = *py; x += 3; return x+y+z; } void main() { int c, *b, **a; c = 4; b = &c; a = &b; printf("%d", f(c, b, a)); }
Official PYQ2008Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
A client process P needs to make a TCP connection to a server process S. Consider the following situation: the server process S executes a socket()\text{socket()}, a bind()\text{bind()} and a listen()\text{listen()} system call in that order, following which it is preempted. Subsequently, the client process P executes a socket()\text{socket()} system call followed by …
Official PYQ2008Computer NetworksFragmentation and IP Addressing, IPv4, CIDRMCQ · 1 mark
If a class BB network on the Internet has a subnet mask of 255.255.248.0255.255.248.0, what is the maximum number of hosts per subnet?
Official PYQ2008Computer NetworksTransport Layer: Flow Control, Congestion Control, UDP, TCP, SocketsMCQ · 1 mark
In the slow start phase of the TCP congestion algorithm, the size of the congestion window:
Official PYQ2008Compiler DesignParsing (LL, LR)MCQ · 1 mark
An LALR(1) parser for a grammar G can have shift-reduce (S-R) conflicts if and only if
Official PYQ2008Compiler DesignRuntime EnvironmentsMCQ · 1 mark
Which of the following are true? A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage allocation Multi-level access link (or display) arrangement is needed to arrange activation records only if the programming language being …