GATE CSE 2024 — Previous Year Questions
Real questions from the 2024 paper with options and answers. Take a timed test →
54 questions · page 2 of 3
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).Q37 · General Aptitude
If ‘→’ denotes increasing order of intensity, then the meaning of the words [dry → arid → parched] is analogous to [diet → fast → ________ ]. Which one of the given options is appropriate to fill the blank?- A.starve
- B.reject
- C.feast
- D.deny
Show answer / उत्तर देखें
Answer: A starve
Official GATE 2024 answer key: (A).Q38 · General Aptitude
If two distinct non-zero real variables 𝑥 and 𝑦 are such that (𝑥 + 𝑦) is proportional to (𝑥 − 𝑦) then the value of 𝑥 𝑦- A.depends on 𝑥𝑦
- B.depends only on 𝑥 and not on 𝑦
- C.depends only on 𝑦 and not on 𝑥
- D.is a constant
Show answer / उत्तर देखें
Answer: D is a constant
Official GATE 2024 answer key: (D).Q39 · General Aptitude
Consider the following sample of numbers: 9, 18, 11, 14, 15, 17, 10, 69, 11, 13 The median of the sample is- A.13.5
- B.14
- C.11
- D.18.7
Show answer / उत्तर देखें
Answer: A 13.5
Official GATE 2024 answer key: (A).Q40 · General Aptitude
The number of coins of ₹1, ₹5, and ₹10 denominations that a person has are in the ratio 5:3:13. Of the total amount, the percentage of money in ₹5 coins is- A.21%
- B.14 2 7%
- C.10%
- D.30%
Show answer / उत्तर देखें
Answer: C 10%
Official GATE 2024 answer key: (C).Q41 · General Aptitude
For positive non-zero real variables 𝑝 and 𝑞, if log (𝑝2 + 𝑞2) = log 𝑝 + log 𝑞 + 2 log 3 , then, the value of 𝑝4+𝑞4 𝑝2𝑞2 is- A.79
- B.81
- C.9
- D.83
Show answer / उत्तर देखें
Answer: A 79
Official GATE 2024 answer key: (A).Q42 · General Aptitude
In the given text, the blanks are numbered (i)−(iv). Select the best match for all the blanks. Steve was advised to keep his head (i) before heading (ii) to bat; for, while he had a head (iii) batting, he could only do so with a cool head s (iv) his shoulders.- A.(i) down (ii) down (iii) on (iv) for
- B.(i) on (ii) down (iii) for (iv) on
- C.(i) down (ii) out (iii) for (iv) on
- D.(i) on (ii) out (iii) on (iv) for
Show answer / उत्तर देखें
Answer: C (i) down (ii) out (iii) for (iv) on
Official GATE 2024 answer key: (C).Q43 · General Aptitude
A rectangular paper sheet of dimensions 54 cm × 4 cm is taken. The two longer edges of the sheet are joined together to create a cylindrical tube. A cube whose surface area is equal to the area of the sheet is also taken. Then, the ratio of the volume of the cylindrical tube to the volume of the cube is- A.1/π
- B.2/π
- C.3/π
- D.4/π
Show answer / उत्तर देखें
Answer: A 1/π
Official GATE 2024 answer key: (A).Q44 · General Aptitude
The pie chart presents the percentage contribution of different macronutrients to a typical 2,000 kcal diet of a person. The typical energy density (kcal/g) of these macronutrients is given in the table. Macronutrient Energy density (kcal/g) Carbohydrates 4 Proteins 4 Unsaturated fat 9 Saturated fat 9 Trans fat 9 The total fat (all three types), in grams, this person consumes is- A.44.4
- B.77.8
- C.100
- D.3,600 Carbohydrates 35% Proteins 20% Unsaturated fat 20% Saturated fat 20% Trans fat 5% Macronutrient energy contribution
Show answer / उत्तर देखें
Answer: C 100
Official GATE 2024 answer key: (C).Q45 · General Aptitude
A rectangular paper of 20 cm × 8 cm is folded 3 times. Each fold is made along the line of symmetry, which is perpendicular to its long edge. The perimeter of the final folded sheet (in cm) is- A.18
- B.24
- C.20
- D.21
Show answer / उत्तर देखें
Answer: A 18
Official GATE 2024 answer key: (A).Q46 · General Aptitude
If ‘→’ denotes increasing order of intensity, then the meaning of the words [walk → jog → sprint] is analogous to [bothered → ________ → daunted]. Which one of the given options is appropriate to fill the blank?- A.phased
- B.phrased
- C.fazed
- D.fused
Show answer / उत्तर देखें
Answer: C fazed
Official GATE 2024 answer key: (C).Q47 · General Aptitude
Two wizards try to create a spell using all the four elements, water, air, fire, and earth. For this, they decide to mix all these elements in all possible orders. They also decide to work independently. After trying all possible combination of elements, they conclude that the spell does not work. How many attempts does each wizard make before coming to this conclusion, independently?- A.24
- B.48
- C.16
- D.12
Show answer / उत्तर देखें
Answer: A 24
Official GATE 2024 answer key: (A).Q48 · General Aptitude
In an engineering college of 10,000 students, 1,500 like neither their core branches nor other branches. The number of students who like their core branches is 1/4th of the number of students who like other branches. The number of students who like both their core and other branches is 500. The number of students who like their core branches is- A.1,800
- B.3,500
- C.1,600
- D.1,500
Show answer / उत्तर देखें
Answer: A 1,800
Official GATE 2024 answer key: (A).Q49 · General Aptitude
For positive non-zero real variables 𝑥 and 𝑦, if ln (𝑥 + 𝑦 2 ) = 1 2 [ln(𝑥) + ln(𝑦)] then, the value of 𝑥 𝑦 + 𝑦 𝑥 is- A.1
- B.1/2
- C.2
- D.4
Show answer / उत्तर देखें
Answer: C 2
Official GATE 2024 answer key: (C).Q50 · General Aptitude
In the sequence 6, 9, 14, x, 30, 41, a possible value of 𝑥 is- A.25
- B.21
- C.18
- D.20
Show answer / उत्तर देखें
Answer: B 21
Official GATE 2024 answer key: (B).