Computer Science and Information Technology
GATE CSE topic:computing PYQs
Build your understanding with focused practice from past exam papers.
Questions 741–750 of 975. Imported answers require independent review unless marked reviewed.
Question 16
Open questionCSMCQ1 markNeeds review
Which of the following protocol pairs can be used to send and retrieve e-mails (in that order)?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 17
Open questionCSNAT1 markNeeds review
The following C program is executed on a Unix/Linux system:
#include <unistd.h>
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 __________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 18
Open questionCSNAT1 markNeeds review
Consider the following C program:
#include <stdio.h>
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 __________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 19
Open questionCSNAT1 markNeeds review
Consider the grammar given below:
S → Aa
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 , then the answer should be 3210)
Answer: __________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 20
Open questionCSNAT1 markNeeds review
An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to 2 decimal places) is ________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 21
Open questionCSNAT1 markNeeds review
The value of
is ________.Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 22
Open questionCSNAT1 markNeeds review
Two numbers are chosen independently and uniformly at random from the set {1, 2, ..., 13}. The probability (rounded off to 3 decimal places) that their 4-bit (unsigned) binary representations have the same most significant bit is ________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 23
Open questionCSNAT1 markNeeds review
Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100.
P1 | P2 | P3 |
|---|---|---|
⋮ | ⋮ | ⋮ |
D = D + 20 | D = D − 50 | D = D + 10 |
⋮ | ⋮ | ⋮ |
The processes are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of D after the three processes have completed execution are X and Y respectively, then the value of Y − X is ______________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 24
Open questionCSNAT1 markNeeds review
Consider the following C program:
#include <stdio.h>
int main(){
int arr[]={1,2,3,4,5,6,7,8,9,0,1,2,5}, *ip=arr+4;
printf("%d\n", ip[1]);
return 0;
}
The number that will be displayed on execution of the program is ________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 25
Open questionCSNAT1 markNeeds review
Consider a sequence of 14 elements:
. The subsequence sum
. Determine the maximum of
, where
. (Divide and conquer approach may be used.)Answer: ________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer