Time Left - 18:00 mins

GATE 2022 Rapid Revision Quiz 6

Attempt now to get your rank among 163 students!

Question 1

Consider the following program:

main()

{

int x, y, z;

/* Gradeup is best for GATE*/

int x = 2 + 3 + 5;

printf(“%d”, &x);

/* address of variables x*/

}

The number of tokens present in above program is _______.

Question 2

Which of the following represents the worst case time complexity to check whether a given tree is minheap tree or not with ‘n’ nodes?

Question 3

Consider the following code with two threads, Producer and Consumer, that can run parallel. Further, S and Q are binary semaphore equipped with the standards P (Wait) and V (Signal) operations. semaphore S = 1, Q = 0; and integer x;

Which of the following is TRUE about the program above?

Question 4

Suppose you are able to solve an NP-complete problem in polynomial time on a deterministic Turing machine, then what we can deduct from that?

Question 5

Consider the directed graph given below :

Consider the following BFS traversal of the graph starting from vertex P.
I. PQRTMSNU
II. PQTNRMUS
III. PQRTNMSU
IV. PQRMSTNU
The number of valid BFS traversal are _________ .

Question 6

Max-heap is constructed by inserting the following integer in the order into an empty tree. The sum of minimum integer value present at every level of max heap tree ________.
Input: 20, 32, 1, 3, 4, 5, 6, 7, 10, 23, 45

Question 7

Consider a network connecting two systems, ‘A’ and ‘B’ located 6000 km apart. The propagation speed of media is 2 × 10mps. It is needed to design a Go-Back-7 sliding window protocol for this network. The average packet size is 107 bits. If network used at its full capacity, then the bandwidth of network is__________ Mbps

Question 8

Match List-I (Networking devices) with List-II (property) and select the correct answer using the codes given below the lists:

(a) A-3 B-1 C-2

(b) A-1 B-2 C-3

(c) A-3 B-2 C-2

(d) A-2 B-3 C-1

  • 163 attempts
  • 1 upvote
  • 1 comment
Jan 19GATE & PSU CS