πŸ“š

GATE CS - Previous Year Questions

Previous-year GATE CS prompts for practice β€” options only until official keys are verified

142 questions15 pages~213 min

Practice with previous-year prompts and options. Official answer keys are not shown here yet β€” mark your choice, then verify against the IIT key PDF.

Use this track for exam reading speed and elimination practice until verified keys are linked.

Progress: 0 / 1420%
Page 14 of 15 β€’ Questions 131-140 of 142
Practice mode: questions and options only. Official IIT answer keys are not linked here yet β€” mark your choice, then cross-check the official key yourself.
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) 𝐡 β†’ πœ–