Computer Science and Information Technology
2021 · Paper 1
Take it one question at a time. Try an answer, then check your understanding.
Complete GATE CSE 2021 Paper 1 overview, original pages and practice · Timed previous-paper practice
Questions 58–60 of 65. Imported answers require review unless explicitly marked reviewed.
Question 48
Open questionCSNAT2 marksNeeds review
Consider the following ANSI C function:
int SimpleFunction(int Y[], int n, int x)
{
int total = Y[0], loopIndex;
for (loopIndex = 1; loopIndex <= n - 1; loopIndex++)
total = x * total + Y[loopIndex];
return total;
}
Let
be an array of 10 elements with
, for all
such that
. The value returned by SimpleFunction(Z, 10, 2) 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 49
Open questionCSNAT2 marksNeeds review
Consider the sliding window flow-control protocol operating between a sender and a receiver over a full-duplex error-free link. Assume the following:
The time taken for processing the data frame by the receiver is negligible.
The time taken for processing the acknowledgement frame by the sender is negligible.
The sender has infinite number of frames available for transmission.
The size of the data frame is 2,000 bits and the size of the acknowledgement frame is 10 bits.
The link data rate in each direction is 1 Mbps (=
bits per second).One way propagation delay of the link is 100 milliseconds.
The minimum value of the sender’s window size in terms of the number of frames (rounded to the nearest integer) needed to achieve a link utilization of 50% 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 50
Open questionCSNAT2 marksNeeds review
Consider the following C code segment:
a = b + c;
e = a + 1;
d = b + c;
f = d + 1;
g = e + f;
In a compiler, this code segment is represented internally as a directed acyclic graph (DAG). The number of nodes in the DAG 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 answer