CS/IT Gate Yearwise
CS/IT Gate 2025 (Set 2)
CS/IT Gate 2024 (Set 1)
CS/IT Gate 2024 (Set 2)
CS/IT Gate 2023
CS/IT Gate 2022
CS/IT Gate 2021 (Set 1)
CS/IT Gate 2021 (Set 2)
CS/IT Gate 2020
CS/IT Gate 2019
CS/IT Gate 2018
CS/IT Gate 2017 (Set 1)
CS/IT Gate 2017 (Set 2)
CS/IT Gate 2016 (Set 1)
CS/IT Gate 2016 (Set 2)
CS/IT Gate 2015 (Set 1)
CS/IT Gate 2015 (Set 2)
CS/IT Gate 2015 (Set 3)
CS/IT Gate 2014 (Set 1)
CS/IT Gate 2014 (Set 2)
CS/IT Gate 2014 (Set 3)
CS and IT Gate 2019 Questions with Answer
Ques 14 Gate 2019
Consider the following C program:
int main() {
float sum = 0.0, j = 1.0, i = 2.0;
while (i / j > 0.0625) {
j = j + j;
printf("%f ", sum);
};
return 0;
}
The number of times variable sum will be printed When the above program is executed is _________ .
Ques 15 Gate 2019
Consider the following C program:
int main(){
int arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 5}, *ip = arr + 4;
printf("%dn", ip[1]);
return 0;
}
The number that will be displayed on execution of the program is _________ .
Ques 16 Gate 2019
Consider the following C program:
int jumble(int x, int y) {
x = 2 * x + y;
return x;
}
int main() {
int x = 2, y = 5;
y = jumble(y, x);
x = jumble(y, x);
printf("%d ", x);
return 0;
}
The value printed by program is __________
Ques 17 Gate 2019
Consider the following C program:
int r(){
int static num=7;
return num--;
}
int main() {
for(r();r();r()) {
printf("%d ",r());
};
return 0;
}
Ques 18 Gate 2019
Consider the following C program:
if (n < 0)
printf(“ % d”, n);
else {
convert(n / 2);
printf(“ % d”, n % 2);
}
}
Ques 19 Gate 2019
Consider Z = X →Y where X, Y and Z are all in sign-magnitude form. X and Y are each represented in n bits. To avoid overflow, the representation of Z would require a minimum of:
Ques 20 Gate 2019
A certain processor uses a fully associative cache of size 16 kB, The cache block size is 16 bytes. Assume that the main memory is byte addressable and uses a 32-bit address. How many bits are required for the Tag and the Index fields respectively in the addresses generated by the processor?
Ques 21 Gate 2019
Which one of the following kinds of derivation is used by LR parsers?
Ques 22 Gate 2019
Consider the augmented grammar given below:
S → ⏐id
L → L, S⏐S
Let I0= CLOSURE ({[S′ → S]}).
The number of items in the set GOTO (I0, <) is __________.
Ques 23 Gate 2019
Consider that 15 machines need to be connected in a LAN using 8-port Ethernet switches. Assume that these switches do not have any separate up link ports. The minimum number of switches needed is ___________.
Ques 24 Gate 2019
Consider three machines M, N and P with IP addresses 100.10.5.2, 100.10.5.5 and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252 for all the three machines. Which one of the following is true?
Ques 25 Gate 2019
Which of the following protocol pairs can be used to send and retrieve e-mails (in that order)?
Ques 26 Gate 2019
Let T be a full binary tree with 8 leaves. (A full binary tree has every level full.) Suppose two leaves a and b of T are chosen uniformly and independently at random. The expected value of the distance between a and b in T (i.e., the number of edges in the unique path between a and b) is (rounded off to 2 decimal places) ___________ .
Total Unique Visitors