# GATE Solved Paper 2017-19 - GATE 2019

• A

IMAP, POP3  • B

SMTP, POP3  • C

SMTP, MIME  • D

IMAP, SMTP  • Option : B
• Explanation :
SMTP is push protocol and to send email and POP3 is pull protocol i.e. to retrieve email.

int main()
{
int i;
for (i=0; i<10; i++)
if (i%2 == 0) fork();
return 0;
}
The total number of child processes created is ________.

Note – Numerical Type question

• A

31  • B

63  • C

5  • D

6  • Option : A
• Explanation :
Condition “if” will be satisfy for i = 0, 2, 4, 6, 8 only. So, “fork()” will call for 5 times.
Total number of processes created is,
= 2number of fork()
There is always only one parent process of these processes and remaining will be child processes.
Hence number of child process created is,
= 2number of fork() - 1
= 25 - 1
= 32 - 1
= 31
So, option (A) is correct

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 \n”, x);
return 0;
}
The value printed by the program is _______.

Note – Numerical Type question

• A

10  • B

8  • C

6  • D

3  • Option : A
• Explanation :
Given, “for” loop will run from i=0 to 4.
i = 0
sum = 0+ 10 – 10 = 0
i = 1
sum = 0 + 9 – 8 = 1
i = 2
sum = 1 + 8 – 6 = 3
i = 3
sum = 3 + 7 – 4 = 6
i = 4
sum = 6 + 6 – 2 = 10
Now, loop terminate and value of sum (i.e., 10) will be printed.
So, The output of above C program is 10.

A → BD
B → b | ϵ
D → d | ϵ
Let a, b, d, and \$ be indexed as follows:
 a b d \$ 3 2 1 0
Compute the FOLLOW set of the non-terminal B and write the index values for the symbols in the FOLLOW set in the descending order. (For example, if the FOLLOW set is {a, b, d, \$}, then the answer should be 3210)

Note – Numerical Type question

• A

31  • B

310  • C

230  • D

23  • Option : A
• Explanation :
S → Aa
A → BD
B → b⏐∈
D → d⏐∈
Hence their index in descending order is 31.

• A

0.08  • B

0.0016  • C

0.04  • D

0.0008  • Option : A
• Explanation :
Given an array of 25 distinct elements, and pivot element is chosen uniformly randomly. So, there are only 2 worst case position in the pivot element is either first (or) last.
Therefore, required probability is,
= 2/25
= 0.08
So, option (A) is correct.
Related Quiz.
GATE 2019