• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE-CS-2016 (Set 1)

Question 41

The size of the data count register of a DMA controller is 16 bits. The processor needs to transfer a file of 29,154 kilobytes from disk to main memory. The memory is byte addressable. The minimum number of times the DMA controller needs to get the control of the system bus from the processor to transfer the file from the disk to main memory is _________   Note : This question was asked as Numerical Answer Type.
  • 3644
  • 3645
  • 456
  • 1823

Question 42

The stage delays in a 4-stage pipeline are 800, 500, 400 and 300 picoseconds. The first stage (with delay 800 picoseconds) is replaced with a functionally equivalent design involving two stages with respective delays 600 and 350 picoseconds. The throughput increase of the pipeline is _______ percent. [This Question was originally a Fill-in-the-Blanks question]
  • 33 or 34
  • 30 or 31
  • 38 or 39
  • 100

Question 43

Consider a carry lookahead adder for adding two n-bit integers, built using gates of fan-in at most two. The time to perform addition using this adder is
  • Θ(1)
  • Θ(Log (n))
  • Θ(√ n)
  • Θ(n)

Question 44

What will be the output of the following JAVA program? 

Java
class GFG
{
   static int d=1;
   static void count(int n)
    {
    System.out.print(n+" ");
    System.out.print(d+" ");
    d++;
    if(n > 1) count(n-1);
    System.out.print(d+" ");
  }

 public static void main(String args[])
    {
       count(3);
    }
}
  • 3 1 2 2 1 3 4 4 4

  • 3 1 2 1 1 1 2 2 2

  • 3 1 2 2 1 3 4

  • 3 1 2 1 1 1 2

Question 45

What will be the output of the following pseudo-code when parameters are passed by reference and dynamic scoping is assumed?
a=3;
void n(x) {x = x * a; print(x);}
void m(y) {a = 1; a = y - a; n(a); print(a);}
void main() {m(a);} 
  • 6, 2
  • 6, 6
  • 4, 2
  • 4, 4

Question 46

An operator delete(i) for a binary heap data structure is to be designed to delete the item in the i-th node. Assume that the heap is implemented in an array and i refers to the i-th index of the array. If the heap tree has depth d (number of edges on the path from the root to the farthest leaf), then what is the time complexity to re-fix the heap efficiently after the removal of the element?

  • O(1)

  • O(d) but not O(1)

  • O(2d) but not O(d)

  • O(d2d) but not O(2d)

Question 47

Consider the weighted undirected graph with 4 vertices, where the weight of edge {i, j} g is given by the entry Wij in the matrix W
gt164
The largest possible integer value of x, for which at least one shortest path between some pair of vertices will contain the edge with weight x is ________
  Note : This question was asked as Numerical Answer Type.
  • 8
  • 12
  • 10
  • 11

Question 48

Let G be a complete undirected graph on 4 vertices, having 6 edges with weights being 1, 2, 3, 4, 5, and 6. The maximum possible weight that a minimum weight spanning tree of G can have is.

  • 6

  • 7

  • 8

  • 9

Question 49

G = (V, E) is an undirected simple graph in which each edge has a distinct weight, and e is a particular edge of G. Which of the following statements about the minimum spanning trees (MSTs) of G is/are TRUE

I.  If e is the lightest edge of some cycle in G, 
    then every MST of G includes e
II. If e is the heaviest edge of some cycle in G, 
    then every MST of G excludes e
  • I only

  • II only

  • both I and II

  • neither I nor II

Question 50

Let Q denote a queue containing sixteen numbers and S be an empty stack. Head(Q) returns the element at the head of the queue Q without removing it from Q. Similarly Top(S) returns the element at the top of S without removing it from S. Consider the algorithm given below. \"gtcs7\" The maximum possible number of iterations of the while loop in the algorithm is______ [This Question was originally a Fill-in-the-Blanks question]

  • 16

  • 32

  • 256

  • 64

There are 65 questions to complete.

Last Updated :
Take a part in the ongoing discussion