Time Left - 40:00 mins

GATE -2019 : Subject Revision Test-2(DS / ALgo / CN) (App update required to attempt this test)

Attempt now to get your rank among 500 students!

Question 1

Find the output of the following program.
main()
{
int i =_1_abc(10);
print f ("%d\n",--i);
}
int_1_abc(int i)
{
return(i ++);
}

Question 2

Consider the following code:
char *p1;
int *p2;
float *p3;
What is the size of p1, p2, p3 respectively if int takes 4 bytes, char takes 1 byte, float takes 4 bytes and pointer size is 4 bytes?

Question 3

Solve the recurrence: T(n) = 2T(n1/2) + logn

Question 4

The worst case efficiency sequential searching is

Question 5

Consider the following C program.
int x;
int main()
{
int y;
//
{
int z;
//
}
}
Which variable has the longest scope in the above program?

Question 6

The depth of a complete binary tree with n nodes is ?

Question 7

The following three 'C' language statements is equivalent to which single statement?
y = y+1;
z = x+y;
x = x+1;

Question 8

Consider the weighted undirected graph below
 
Assume that edge FG is added to the minimum spanning tree. For what maximum value of FG does this new edge belong to the minimum spanning tree?

Question 9

if we have T(n) = n + T(n - 1) then what is complexity if Then T(n) ?

Question 10

TCP/IP was included by a _______ operating system .

Question 11

Consider a LAN with four nodes S1, S2, S3 and STime is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision is said to have occurred if more than one node transmit in the same slot. S1 generates the frame 1 out of 10 times. S2 generates the frame 2 out of 10 times. S3 generates the frame 3 out of 10 times. S4 generates the frame 4 out of 10 times. The probability of sending a frame in the first slot without any collision by any of these four stations is _________. (upto 4 decimal places)

Question 12

Consider the following statements:
S1: Processing
S2: Transmission
S3: Propagation
S4: Queuing
Which of the above statement(s) causes of packet delay?

Question 13

If the UDP header is given as
(FFF0OO35FFEEFFEE)16
Which type of request is made by this UDP header?

Question 14

Host A sends a UDP datagram containing 8880 bytes of user data to host B over an Ethernet LAN. Ethernet frames may carry data up to 1500 bytes (i.e. MTU=1500 bytes). Size of UDP header is 8 bytes and size of IP header is 20 bytes. There is no option field in IP header. How many total number of IP fragments will be transmitted and what will be the contents of offset field in the last fragment?

Question 15

A link has a transmission speed of 106 bits/sec. It uses data packets of size 1000 bytes each. Assume that the acknowledgment has negligible transmission delay, and that its propagationdelay is the same as the data propagation delay. Also assume that the processing delays at nodes are negligible. The efficiency of the stop-and-wait protocol in this setup is exactly 25%. The value of the one-way propagation delay (in milliseconds) is ____________.
  • 500 attempts
  • 2 upvotes
  • 11 comments
Oct 7GATE & PSU CS