Q1
Show answer without attempting
Answer: D
GATE CS · 8 February 2020 · Slot 2 · 65 questions
Every question from the GATE CS 2020 CS paper held on 8 February 2020, 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: D
Answer: A
Answer: A
Answer: D

Answer: B
Answer: D
Answer: C

Answer: A
Answer: B

Answer: C
Answer: A
Answer: A
Answer: C

Answer: C
Answer: B
Answer: C
Answer: Marks to all
Answer: D
Answer: D
Answer: C
Answer: C
Answer: C
SELECT s.sno, s.sname
FROM Suppliers s, Catalogue c
WHERE s.sno = c.sno AND
cost > (SELECT AVG (cost)
FROM Catalogue
WHERE pno = 'P4'
GROUP BY pno);
Answer: A
Answer: A
Answer: D
Answer: C
Answer: 0.125
Answer: 7
Answer: 5
Answer: 1034
Answer: 13.3 OR 13.5
#include <stdio.h>
int main() {
int a[4][5]={{1, 2, 3, 4, 5},
{6, 7, 8, 9, 10},
{11, 12, 13, 14, 15},
{16, 17, 18 , 19, 20}};
printf("%d\n", *(*(a+**a+2)+3));
return(0);
}Answer: 19
Answer: 13
Answer: 7
Answer: 6
Answer: A
Answer: C

Answer: B
Answer: B
Answer: B
Answer: D
Answer: A
Answer: B
CODE SECTION P
wait(a); count=count+1;
if (count==n) signal(b);
signal(a); wait(b); signal(b);
CODE SECTION QAnswer: A
Answer: B
Answer: A

Answer: A
Answer: B
Answer: C
Answer: A
Answer: B
Answer: 12
Answer: 2.15 to 2.18
Answer: 14
Answer: 0.5
int fun1(int n) {
static int i = 0;
if (n > 0) {
++i;
fun1(n-1);
}
return(i);
}
int fun2(int n) {
static int i = 0;
if (n > 0) {
i = i + fun1(n);
fun2(n-1);
}
return(i);
}Answer: 55
Answer: 511
int tob(int b, int* arr) {
int i;
for (i=0; b>0; i++) {
if (b%2) arr[i]=1;
else arr[i]=0;
b = b/2;
}
return(i);
}
int pp(int a, int b) {
int arr[20];
int i, tot = 1, ex, len;
ex = a;
len = tob(b,arr);
for (i=0; i<len; i++) {
if (arr[i]==1)
tot = tot * ex;
ex = ex * ex;
}
return(tot);
}Answer: 81
Answer: 99
| Processes | ||||
|---|---|---|---|---|
| Burst time (in ms) | 8 | 7 | 2 | 4 |
Answer: 5.25
Answer: 6
Answer: 7
Answer: 154.5 to 155.5
Answer: 4
Answer: 44
0/650 correct0 marks