• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE CS 2011

Question 41

An application loads 100 libraries at start-up. Loading each library requires exactly one disk access. The seek time of the disk to a random location is given as 10 ms. Rotational speed of disk is 6000 rpm. If all 100 libraries are loaded from random locations on the disk, how long does it take to load all libraries? (The time to transfer data from the disk block once the head has been positioned at the start of the block may be neglected)
  • 0.50 s
  • 1.50 s
  • 1.25 s
  • 1.00 s

Question 42

A deterministic finite automation (DFA)D with alphabet {a,b} is given below GATE2011AT1 Which of the following finite state machines is a valid minimal DFA which accepts the same language as D? GATE2011AT2 GATE2011AT3
  • A
  • B
  • C
  • D

Question 43

The following is the comment written for a C function.

 
        /* This function computes the roots of a quadratic equation
           a.x^2 + b.x + c = . The function stores two real roots
           in *root1 and *root2 and returns the status of validity
           of roots. It handles four different kinds of cases.
           (i) When coefficient a is zero irrespective of discriminant
           (ii) When discriminant is positive
           (iii) When discriminant is zero
           (iv) When discriminant is negative.
           Only in case (ii) and (iii) the stored roots are valid.
           Otherwise 0 is stored in roots. The function returns
           0 when the roots are valid and -1 otherwise.
           The function also ensures root1 >= root2
              int get_QuadRoots( float a, float b, float c,
                 float *root1, float *root2);
        */

A software test engineer is assigned the job of doing black box testing. He comes up with the following test cases, many of which are redundant. 

[caption width="800"] [/caption]


 Which one of the following option provide the set of non-redundant tests using equivalence class partitioning approach from input perspective for black box testing?

  • T1,T2,T3,T6

  • T1,T3,T4,T5

  • T2,T4,T5,T6

  • T2,T3,T4,T5

Question 44

Consider the following recursive C++ function that takes two arguments 

C++
 unsigned int foo(unsigned int n, unsigned int r) {
  if (n  > 0) return (n%r +  foo (n/r, r ));
  else return 0;
}

What is the return value of the function foo when it is called foo(345, 10)?

  • 345

  • 12

  • 5

  • 3

Question 45

Consider the same recursive C++ function that takes two arguments 

C++
unsigned int foo(unsigned int n, unsigned int r)
{
    if (n > 0)
        return (n % r + foo(n / r, r));
    else
        return 0;
}

What is the return value of the function foo when it is called as foo(513, 2)?

  • 9

  • 8

  • 5

  • 2

Question 46

Consider the following circuit involving three D-type flip-flops used in a certain type of counter configuration. 

[caption width="800"] [/caption]

If at some instance prior to the occurrence of the clock edge, P, Q and R have a value 0, 1 and 0 respectively, what shall be the value of PQR after the clock edge?

  • 000

  • 001

  • 010

  • 011

Question 47

Consider the data given in previous question. If all the flip-flops were reset to 0 at power on, what is the total number of distinct outputs (states) represented by PQR generated by the counter?

  • 3

  • 4

  • 5

  • 6

Question 48

Consider the same data as given in previous question. After the update in the previous question, the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector as cost, infinite. After the NEXT ROUND of update, what will be cost to N1 in the distance vector of N3?
  • 3
  • 9
  • 10
  • Infinite

Question 49

An undirected graph G(V, E) contains n ( n > 2 ) nodes named v1 , v2 ,….vn. Two nodes vi , vj are connected if and only if 0 < |i – j| <= 2. Each edge (vi, vj ) is assigned a weight i + j. A sample graph with n = 4 is shown below. What will be the cost of the minimum spanning tree (MST) of such a graph with n nodes?
  • 1/12(11n^2 – 5n)
  • n^2 – n + 1
  • 6n – 11
  • 2n + 1

Question 50

The length of the path from v5 to v6 in the MST of previous question with n = 10 is
  • 11
  • 25
  • 31
  • 41

There are 64 questions to complete.

Last Updated :
Take a part in the ongoing discussion