Q1
Among the options below, an acceptable value for the total number of students in the class is:
Show answer without attempting
Answer: C
GATE CS · 13 February 2021 · Slot 1 · 65 questions
Every question from the GATE CS 2021 CS-1 paper held on 13 February 2021, in the order it was printed, with the official answer key. Pick an option, or type the number for numerical-answer questions, and it is marked straight away with GATE marking: 1 or 2 marks, −⅓ or −⅔ for a wrong MCQ, no negative marks for MSQ and NAT.
Answer: C
Answer: A
Answer: C

Answer: A
Answer: C
Answer: C
| Items | Cost (₹) | Profit % | Marked Price (₹) |
|---|---|---|---|
| P | 5,400 | --- | 5,860 |
| Q | --- | 25 | 10,000 |
Answer: C
Answer: C
Answer: C OR D
Answer: D
Answer: C
Answer: C
Answer: D
Answer: C
Answer: C
Answer: A
Answer: B
Answer: C
| 23 | 32 | 45 | 69 | 72 | 73 | 89 | 97 |
|---|
Answer: C
Answer: D
Answer: A, C
Answer: D
Answer: A
Answer: A, C
Answer: A, C
Answer: 11

Answer: 3
Answer: 0.35 to 0.39
Answer: 65
Answer: 0.25
Answer: 86
Answer: 17
Answer: 819 to 820 OR 205
Answer: -7.75
Answer: 12
P → D* E*
D → int ID {record that ID.lexeme is of type int}
D → bool ID {record that ID.lexeme is of type bool}
E → E1 + E2 {check that E1.type = E2.type = int; set E.type := int}
E → !E1 {check that E1.type = bool; set E.type := bool}
E → ID {set E.type := int}Answer: B
Answer: C

Answer: A
| 1 | 1 | 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 |
Answer: A
Answer: C
| S | (1) | (2) | ||||
| T | (3) | (4) | ||||
| R |
Answer: A
Answer: B
Answer: A
Answer: B
Answer: D
Answer: A
#include <stdio.h>
int main()
{
int i, j, count;
count = 0;
i = 0;
for (j = -3; j <= 3; j++)
{
if ((j >= 0) && (i++))
count = count + j;
}
count = count + i;
printf("%d", count);
return 0;
}Answer: B
Answer: D
Answer: A
Answer: A, C
Answer: B
Answer: B, C, D
Answer: C
Answer: A, B, C
Answer: A, C
1. int counter = 0;
2. Semaphore S = init(5);
3. void parop(void)
4. {
5. wait(S);
6. wait(S);
7. counter++;
8. signal(S);
9. signal(S);
10.}Answer: A, B, D

Answer: C
int SimpleFunction(int Y[], int n, int x)
{
int total = Y[0], loopIndex;
for (loopIndex = 1; loopIndex <= n - 1; loopIndex++)
total = x * total + Y[loopIndex];
return total;
}Answer: 1023
Answer: 50 to 52
a = b + c;
e = a + 1;
d = b + c;
f = d + 1;
g = e + f;Answer: 6

Answer: 50
Answer: 3
Answer: 17160

Answer: 0.04
| Instruction | Semantics | Instruction Size (bytes) |
|---|---|---|
| MOV R1, (5000) | R1 ← MEMORY[5000] | 4 |
| MOV R2, (R3) | R2 ← MEMORY[R3] | 4 |
| ADD R2, R1 | R2 ← R1+R2 | 2 |
| MOV (R3), R2 | MEMORY[R3] ← R2 | 4 |
| INC R3 | R3 ← R3+1 | 2 |
| DEC R1 | R1 ← R1-1 | 2 |
| BNZ 1004 | Branch if not zero to the given absolute address | 2 |
| HALT | Stop | 1 |
Answer: 50
0/650 correct0 marks