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 C Programming
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 _________ .
a is the correct answer.
Ques 15 C Programming
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 _________ .
a is the correct answer.
Ques 16 C Programming
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 __________
a is the correct answer.
Ques 17 C Programming
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 C Programming
Consider the following C program:
if (n < 0)
printf(“ % d”, n);
else {
convert(n / 2);
printf(“ % d”, n % 2);
}
}
Ques 19 COA
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 COA
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 Compiler Design
Which one of the following kinds of derivation is used by LR parsers?
Ques 22 Compiler Design
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 __________.
5 is the correct answer.
Ques 23 Computer Network
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 ___________.
3 is the correct answer.
Ques 24 Computer Network
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 Computer Network
Which of the following protocol pairs can be used to send and retrieve e-mails (in that order)?
Ques 26 Data Structure
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) ___________ .
4.24 to 4.26 is the correct answer.

Total Unique Visitors