π
GATE CS - Previous Year Questions
Actual GATE CS exam questions from previous years (2020-2025)
142 questionsΓ’β¬Β’15 pagesΓ’β¬Β’~213 min
Use this quiz track to strengthen recall, speed, and exam-style decision making. Attempt one page first, review explanations, and then re-attempt incorrect questions without notes.
A good scoring strategy is to mark uncertain questions, finish known ones quickly, and return with elimination logic. This improves accuracy while keeping momentum under time constraints.
Progress: 0 / 1420%
Page 14 of 15 β’ Questions 131-140 of 142
Q131medium
[GATE CS 2024 Set-2 Q29] Which of the following statements is/are FALSE? An attribute grammar is a syntax-directed definition (SDD) in which the functions
Q132medium
[GATE CS 2024 Set-2 Q30] For a Boolean variable π₯, which of the following statements is/are FALSE?
Q133medium
[GATE CS 2024 Set-2 Q31] An instruction format has the following structure: Instruction Number: Opcode destination reg, source reg-1, source reg-2 Consider the following sequence of instructions to be executed in a pipelined processor: I1: DIV R3, R1, R2 I2: SUB R5, R3, R4 I3: ADD R3, R5, R6 I4: MUL R7, R3, R8 Which of the following statements is/are TRUE?
Q134medium
[GATE CS 2024 Set-2 Q32] Which of the following fields of an IP header is/are always modified by any router before it forwards the IP packet?
Q135medium
[GATE CS 2024 Set-2 Q33] Consider the following C function definition. int fX(char *a){ char *b = a; while(*b) b++; return b - a;} Which of the following statements is/are TRUE?
Q136medium
[GATE CS 2024 Set-2 Q36] What is the output of the following C program? #include <stdio.h> int main() { double a[2]={20.0, 25.0}, *p, *q; p = a; q = p + 1; printf(β%d,%dβ, (int)(q β p), (int)(*q β *p)); return 0;}
Q137medium
[GATE CS 2024 Set-2 Q37] Consider a single processor system with four processes A, B, C, and D, represented as given below, where for each process the first value is its arrival time, and the second value is its CPU burst time. A (0, 10), B (2, 6), C (4, 3), and D (6, 7). Which one of the following options gives the average waiting times when preemptive Shortest Remaining Time First (SRTF) and Non-Preemptive Shortest Job First (NP-SJF) CPU scheduling algorithms are applied to the processes?
Q138medium
[GATE CS 2024 Set-2 Q38] IP addresses 10.12.2.0 to 10.12.3.255?
Q139medium
[GATE CS 2024 Set-2 Q39] You are given a set π of distinct integers. A binary search tree π is created by inserting all elements of π one by one, starting with an empty tree. The tree π follows the convention that, at each node, all values stored in the left subtree of the node are smaller than the value stored at the node. You are not aware of the sequence in which these values were inserted into π, and you do not have access to π. Which one of the following statements is TRUE?
Q140medium
[GATE CS 2024 Set-2 Q40] Consider the following context-free grammar where the start symbol is π and the set of terminals is {π,π,π,π}. π β π΄ππ΄πβ‘|β‘π΅ππ΅π π΄ β ππβ‘|β‘π π΅ β ππβ‘|β‘π The following is a partially-filled LL(1) parsing table. π π π π $ π π β π΄ππ΄π π β π΅ππ΅π (1) (2) π΄ π΄ β π (3) π΄ β ππ π΅ (4) π΅ β π π΅ β ππ Which one of the following options represents the CORRECT combination for the numbered cells in the parsing table? Note: In the options, βblankβ denotes that the corresponding cell is empty. (1) π β π΄ππ΄π (2) π β π΅ππ΅π (3) π΄ β π (4) π΅ β π
...