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 PYQ2004Digital LogicSequential CircuitsMCQ · 1 mark
In an SRSR latch made by cross-coupling two NAND gates, if both SS and RR inputs are set to 00, then it will result in
Official PYQ2004Digital LogicBoolean AlgebraMCQ · 1 mark
A Boolean function x’y’+xy+x’yx’y’ + xy + x’y is equivalent to
Official PYQ2004Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 1 mark
Which of the following is NOT true with respect to a transparent bridge and a router?
Official PYQ2004Computer NetworksConcept of Layering: OSI and TCP/IP Protocol StacksMCQ · 1 mark
Choose the best matching between Group 1\text{Group 1} and Group 2\text{Group 2} …
Official PYQ2004DatabasesRelational Model: Relational AlgebraMCQ · 1 mark
Consider the following relation schema pertaining to a students database: Students (rollno, name, address) Enroll (rollno, courseno, coursename) where the primary keys are shown underlined. The number of tuples in the student and Enroll tables are 120120 and 88 respectively. What are the maximum and minimum number of tuples that can be present in …
Official PYQ2004Operating SystemI/O SchedulingMCQ · 1 mark
Consider an operating system capable of loading and executing a single sequential user process at a time. The disk head scheduling algorithm used is First Come First Served (FCFS). If FCFS is replaced by Shortest Seek Time First (SSTF), claimed by the vendor to give 50%50 \% better benchmark results, what is the expected improvement in the I/O performance …
Official PYQ2004Operating SystemProcesses and ThreadsMCQ · 1 mark
Consider the following statements with respect to user-level threads and kernel-supported threads context switch is faster with kernel-supported threads for user-level threads, a system call can block the entire process Kernel supported threads can be scheduled independently User level threads are transparent to the kernel Which of the above statements are …
Official PYQ2004DatabasesTuple Calculus and SQLMCQ · 1 mark
Let R1(A‾,B,C)R_1 \left(\underline{A}, B, C\right) and R2(D‾,E)R_2\left(\underline{D}, E \right) be two relation schema, where the primary keys are shown underlined, and let C be a foreign key in R1R_1 referring to R2R_2. Suppose there is no violation of the above referential integrity constraint in the corresponding relation instances r1r_1 and r2r_2. Which …
Official PYQ2004Compiler DesignParsing (LL, LR)MCQ · 1 mark
Consider a program PP that consists of two source modules M1M_1 and M2M_2 contained in two different files. If M1M_1 contains a reference to a function defined in M2M_2 the reference will be resolved at
Official PYQ2004Compiler DesignParsing (LL, LR)MCQ · 1 mark
Which of the following grammar rules violate the requirements of an operator grammar? P,Q,RP, Q, R are nonterminals, and r,s,tr, s, t are terminals. P→QRP \rightarrow Q R P→QsRP \rightarrow Q s R P→ εP \rightarrow \: \varepsilon P→QtRrP \rightarrow Q t R r
Official PYQ2004Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
Given the following input (4322,1334,1471,9679,1989,6171,6173,4199)(4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function xx mod 1010, which of the following statements are true? 9679,1989,41999679, 1989, 4199 hash to the same value 1471,61711471, 6171 hash to the same value All elements hash to the same value Each element hashes to a different value
Official PYQ2004Programming and Data StructuresTreesMCQ · 1 mark
Level order traversal of a rooted tree can be done by starting from the root and performing
Official PYQ2004Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
The best data structure to check whether an arithmetic expression has balanced parentheses is a
Official PYQ2004Programming and Data StructuresBinary Search TreesMCQ · 1 mark
The following numbers are inserted into an empty binary search tree in the given order: 10,1,3,5,15,12,1610, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)?
Official PYQ2004Programming and Data StructuresArrays, Stacks and QueuesMCQ · 1 mark
A single array A[1…MAXSIZE]A[1 \ldots \text{MAXSIZE}] is used to implement two stacks. The two stacks grow from opposite ends of the array. Variables top1top1 and top2top2 (top1<top2)(top1 < top 2) point to the location of the topmost element in each of the stacks. If the space is to be used efficiently, the condition for “stack full”\text{“}\textsf{stack full}\text{”} is
Official PYQ2004Compiler DesignRuntime EnvironmentsMCQ · 1 mark
Consider the following function void swap(int a, int b) { int temp; temp = a; a = b; b = temp; } In order to exchange the values of two variables xx and yy.
Official PYQ2004Programming and Data StructuresProgramming in CMCQ · 1 mark
The goal of structured programming is to:
Official PYQ2004Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
Consider a system with a two-level paging scheme in which a regular memory access takes 150150 nanosecondsnanoseconds, and servicing a page fault takes 88 millisecondsmilliseconds. An average instruction takes 100100 nanoseconds of CPU time, and two memory accesses. The TLB hit ratio is 9090%, and the page fault rate is one in every 10,00010,000 instructions. What is …
Official PYQ2003Operating SystemMemory Management and Virtual MemoryMCQ · 1 mark
A processor uses 2-level\text{2-level} page tables for virtual to physical address translation. Page tables for both levels are stored in the main memory. Virtual and physical addresses are both 3232 bits wide. The memory is byte addressable. For virtual to physical address translation, the 1010 most significant bits of the virtual address are used as index …
Official PYQ2003Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 1 mark
Consider the following assembly language program for a hypothetical processor A,B,A, B, and CC are 88 bit registers. The meanings of various instructions are shown as comments. MOV B, #0 ; B←0B \leftarrow 0 MOV C, #8 ; C←8C \leftarrow 8 Z: CMP C, #0 ; compare C with 0 JZ X ; jump to X if zero flag is set SUB C, #1 ; C←C−1C \gets C-1 RRC A, #1 ; right …