Time Left - 12:00 mins

GATE 2022 Toppers Quiz 27

Attempt now to get your rank among 95 students!

Question 1

If an undirected graph ‘G’ has n-vertices and has ‘K’ edges . The number of components in the graph is at least.

Question 2

Consider the following code:

#include<string.h>
int i = 10;
int f(int i)
{
    i = 15;
}
int main ()
{
    i = 5;
    f(i);
    printf("%d", i);
    return 0;
}

The output for the above code is ______.

Question 3

Suppose a router has built up the routing table shown below. The router can deliver packets directly over interfaces 0 and 1, or it can forward packets to routers R2, R3, or R4

Consider the following statements :

1) For a packet addressed to the destination 128.96.40.151, router uses R4 as the next hop.

2) For a packet addressed to the destination 192.4.153.17, router uses R4 as the next hop.

Which of the above is/are correct ?

Question 4

Consider the following code segment:

a = b + c

k = a – d

a = k + b

u = v + w

u = a – u

The minimum number of total variables required to convert the above code segment to static single assignment from is

Question 5

Consider the following schedules:

Which one is true about above schedules?

Question 6

Assume that we have a two dimensional array of 60 × 60. Each element is of 4 bytes and array is stored in row major order. RAM is 2 MB and cache is 8 KB with each block of 16 bytes.

L1:

for (i = 0; i < 60; i ++)

{

for (j = 0; j < 60; j++)

{

printf(“%d”, a[i][j]);

}

}

L2:

for (i = 59; i ≥ 0; i – –)

{

for (j = 59; j ≥ 0; j – –)

{

printf(“%d”, a[i][j]);

}

}

In case of direct mapped cache, the number of cache misses are ______ (Assume that cache is empty initially).

Question 7

Consider the operations:
f(X, Y, Z ) = X′Y′ + XZ′ and
g(X, Y, Z) = XYZ′ + X′Z′ + XY′
Which one of the following is correct?

Question 8

A ball thrown vertically upward satisfies the equation S = 160t – 20t2, where S is in meters and t is in seconds. What is the maximum height achieved by the stone?
  • 95 attempts
  • 0 upvotes
  • 0 comments
Jan 6GATE & PSU CS