GATE CS 1998

Last Updated :
Discuss
Comments

Question 1

In a computer system where the 'best-fit' algorithm is used for allocating 'jobs' to 'memory partitions', the following situation was encountered: tabkle When will the 20K job complete? Note - This question was subjective type.
  • 8
  • 18
  • 11
  • None of these

Question 2

Give the correct matching for the following pairs:
A. O(log n)     1. Selection sort
B. O(n)         2. Insertion sort
C. O(nlog n)    3. Binary search
D. O(n^2)       4. Merge sort

codes: 
     A   B   C   D
a.   3   1   2   4
b.   3   1   4   2
c.   1   3   4   2
d.   1   4   3   2
  • a
  • b
  • c
  • d

Question 3

Which of the following algorithm design technique is used in finding all pairs of shortest distances in a graph?
  • Dynamic programming
  • Backtracking
  • Greedy
  • Divide and Conquer

Question 4

Solve the following recurrence relation:
xn = 2xn-1 -1, n>1
x1 = 2

    Question 5

    What value would the following function return for the input x=95 ?
    function fun (x:integer):integer;
    Begin
      If x >100 then fun = x-10
      Else fun = fun(fun( x+11))
    End;
    
    • 89
    • 90
    • 91
    • 92

    Question 6

    Let A be a two dimensional array declared as follows:
    A: array [1 ... 10] [1 ... 15] of integer;
    Assuming that each integer takes one memory location, the array is stored in row-major order and the first element of the array is stored at location 100, what is the address of the element a[i][j] ?
    • 15i+ j+ 84
    • 15j+ i+ 84
    • 10i+ j+ 89
    • 10j+ i+ 89

    Question 7

    Faster access to non-local variables is achieved using an array of pointers to activation records, called a
    • stack
    • heap
    • display
    • activation tree

    Question 8

    Free disk space can be kept track of using a free list or a bit map. Disk addresses require d bits. For a disk with 13 blocks, F of which is free, state the condition under which the free list uses less space than the bit map.

      Question 9

      The overlay tree for a program is as shown below: hier What will be the size of the partition (in physical memory) required to load (and run)  this program?  

      • 12 KB
      • 14 KB
      • 10 KB
      • 8 KB

      Question 10

      When the result of a computation depends on the speed of the processes involved, there is said to be
      • cycle stealing
      • race condition
      • a time lock
      • a deadlock
      Tags:

      There are 83 questions to complete.

      Take a part in the ongoing discussion