• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE-CS-2002

Question 31

The performance of a pipelined processor suffers if :
  • the pipeline stages have different delays
  • consecutive instructions are dependent on each other
  • the pipeline stages share hardware resources
  • all of the above

Question 32

Horizontal microprogramming :
  • does not require use of signal decoders
  • results in larger sized microinstructions than vertical microprogramming
  • uses one bit for each control signal
  • all of the above.

Question 33

Consider the following declaration of a two dimensional array in C: C
   char a[100][100];
Assuming that the main memory is byte-addressable and that the array is stored starting from memory address 0, the address of a [40][50] is :
  • 4040
  • 4050
  • 5040
  • 5050

Question 34

The number of leaf nodes in a rooted tree of n nodes, with each node having 0 or 3 children is:
  • n/2
  • (n - 1)/3
  • (n - 1)/2
  • (2n + 1)/3

Question 35

Consider the following algorithm for searching for a given number x in an unsorted array A[1.....n] having n distinct values:

   1. Choose an i uniformly at random from 1..... n;
   2. If A[i] = x then Stop else Goto 1; 

Assuming that x is present in A, what is the expected number of comparisons made by the algorithm before it terminates ?

  • n

  • n - 1

  • 2n

  • n/2

Question 36

The running time of the following algorithm Procedure A(n)
  If n < = 2 return (1) 
  else return (A(Image not present√nImage not present));
is best described by :
  • O(n)
  • O(log n)
  • O(log Log n)
  • O(l1)

Question 37

A weight-balanced tree is a binary tree in which for each node, the number of nodes in the left subtree is at least half and at most twice the number of nodes in the right subtree. The maximum possible height (number of nodes on the path from the root to the furthest leaf) of such a tree on n nodes is best described by which of the following?
  • log2 n
  • log4/3 n
  • log3 n
  • log3/2 n

Question 38

The smallest finite automation which accepts the language {x | length of x is divisible by 3} has :
  • 2 states
  • 3 states
  • 4 states
  • 5 states

Question 39

Which of the following is true?
  • The complement of a recursive language is recursive.
  • The complement of a recursively enumerable language is recursively enumerable.
  • The complement of a recursive language is either recursive or recursively enumerable.
  • The complement of a context-free language is context-free.

Question 40

The Newton-Raphson iteration Xn + 1 = (Xn/2) + 3/(2Xn) can be used to solve the equation
  • X2 = 3
  • X3 = 3
  • X2 = 2
  • X3 = 2

There are 50 questions to complete.

Last Updated :
Take a part in the ongoing discussion