GATE CSE 2024 — Previous Year Questions
Real questions from the 2024 paper with options and answers. Take a timed test →
36 questions · page 2 of 2
Q26 · Computer Science & IT
When six unbiased dice are rolled simultaneously, the probability of getting all distinct numbers (i.e., 1, 2, 3, 4, 5, and 6) is- A.1 324
- B.5 324
- C.7 324
- D.11 324
Show answer / उत्तर देखें
Answer: B 5 324
Official GATE 2024 answer key: (B).Q27 · Computer Science & IT
Once the DBMS informs the user that a transaction has been successfully completed, its effect should persist even if the system crashes before all its changes are reflected on disk. This property is called- A.durability
- B.atomicity
- C.consistency
- D.isolation
Show answer / उत्तर देखें
Answer: A durability
Official GATE 2024 answer key: (A).Q28 · Computer Science & IT
In the context of owner and weak entity sets in the ER (Entity-Relationship) data model, which one of the following statements is TRUE?- A.The weak entity set MUST have total participation in the identifying relationship
- B.The owner entity set MUST have total participation in the identifying relationship
- C.Both weak and owner entity sets MUST have total participation in the identifying relationship
- D.Neither weak entity set nor owner entity set MUST have total participation in the identifying relationship
Show answer / उत्तर देखें
Answer: A The weak entity set MUST have total participation in the identifying relationship
Official GATE 2024 answer key: (A).Q29 · Computer Science & IT
Consider the following two sets: Set X Set Y P. Lexical Analyzer 1. Abstract Syntax Tree Q. Syntax Analyzer 2. Token R. Intermediate Code Generator 3. Parse Tree S. Code Optimizer 4. Constant Folding Which one of the following options is the CORRECT match from Set X to Set Y ?- A.P – 4; Q – 1; R – 3; S – 2
- B.P – 2; Q – 3; R – 1; S – 4
- C.P – 2; Q – 1; R – 3; S – 4
- D.P – 4; Q – 3; R – 2; S – 1
Show answer / उत्तर देखें
Answer: B P – 2; Q – 3; R – 1; S – 4
Official GATE 2024 answer key: (B).Q30 · Computer Science & IT
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;}- A.4,8
- B.1,5
- C.8,5
- D.1,8
Show answer / उत्तर देखें
Answer: B 1,5
Official GATE 2024 answer key: (B).Q31 · Computer Science & IT
Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?- A.10.12.2.0/23
- B.10.12.2.0/24
- C.10.12.0.0/22
- D.10.12.2.0/22
Show answer / उत्तर देखें
Answer: A 10.12.2.0/23
Official GATE 2024 answer key: (A).Q32 · Computer Science & IT
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?- A.Inorder traversal of 𝑇 can be determined from 𝑉
- B.Root node of 𝑇 can be determined from 𝑉
- C.Preorder traversal of 𝑇 can be determined from 𝑉
- D.Postorder traversal of 𝑇 can be determined from 𝑉
Show answer / उत्तर देखें
Answer: A Inorder traversal of 𝑇 can be determined from 𝑉
Official GATE 2024 answer key: (A).Q33 · Computer Science & IT
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.- A.(1) 𝑆 → 𝐴𝑎𝐴𝑏 (2) 𝑆 → 𝐵𝑏𝐵𝑎 (3) 𝐴 → 𝜖 (4) 𝐵 → 𝜖
- B.(1) 𝑆 → 𝐵𝑏𝐵𝑎 (2) 𝑆 → 𝐴𝑎𝐴𝑏 (3) 𝐴 → 𝜖 (4) 𝐵 → 𝜖
- C.(1) 𝑆 → 𝐴𝑎𝐴𝑏 (2) 𝑆 → 𝐵𝑏𝐵𝑎 (3) blank (4) blank
- D.(1) 𝑆 → 𝐵𝑏𝐵𝑎 (2) 𝑆 → 𝐴𝑎𝐴𝑏 (3) blank (4) blank
Show answer / उत्तर देखें
Answer: A (1) 𝑆 → 𝐴𝑎𝐴𝑏 (2) 𝑆 → 𝐵𝑏𝐵𝑎 (3) 𝐴 → 𝜖 (4) 𝐵 → 𝜖
Official GATE 2024 answer key: (A).Q34 · Computer Science & IT
Consider the following expression: 𝑥[𝑖] = (𝑝 + 𝑟) ∗ −𝑠[𝑖] + 𝑢/𝑤. The following sequence shows the list of triples representing the given expression, with entries missing for triples (1), (3), and (6). Which one of the following options fills in the missing entries CORRECTLY? (0) + 𝑝 𝑟 (1) (2) uminus (1) (3) (4) / 𝑢 𝑤 (5) + (3) (4) (6) (7) = (6) (5)- A.(1) =[]𝑠𝑖 (3) * (0) (2) (6) []=𝑥𝑖
- B.(1) []=𝑠𝑖 (3) –(0)(2) (6) =[] 𝑥(5)
- C.(1) =[] 𝑠𝑖 (3) * (0)(2) (6) []= 𝑥(5)
- D.(1) []= 𝑠𝑖 (3) –(0)(2) (6) =[] 𝑥𝑖
Show answer / उत्तर देखें
Answer: A (1) =[]𝑠𝑖 (3) * (0) (2) (6) []=𝑥𝑖
Official GATE 2024 answer key: (A).Q35 · Computer Science & IT
Let 𝑥 and 𝑦 be random variables, not necessarily independent, that take real values in the interval [0,1]. Let 𝑧 = 𝑥𝑦 and let the mean values of 𝑥, 𝑦, 𝑧 be 𝑥̅, 𝑦̅, 𝑧̅, respectively. Which one of the following statements is TRUE?- A.𝑧̅ = 𝑥̅𝑦̅
- B.𝑧̅ ≤ 𝑥̅𝑦̅
- C.𝑧̅ ≥ 𝑥̅ 𝑦̅
- D.𝑧̅ ≤ 𝑥̅
Show answer / उत्तर देखें
Answer: D 𝑧̅ ≤ 𝑥̅
Official GATE 2024 answer key: (D).Q36 · Computer Science & IT
The relation schema, Person(pid,city), describes the city of residence for every person uniquely identified by pid. The following relational algebra operators are available: selection, projection, cross product, and rename. To find the list of cities where at least 3 persons reside, using the above operators, the minimum number of cross product operations that must be used is- A.1
- B.2
- C.3
- D.4
Show answer / उत्तर देखें
Answer: B 2
Official GATE 2024 answer key: (B).