BE2: Object Oriented Technology by smFF0Hn

VIEWS: 9 PAGES: 18

									B2.1: Data Structure Through 'C' Language - July 2000

Note:
    1. There are TWO PARTS in this module/paper.
    2. PART ONE is to be answered in the TEAR-OFF ANSWER SHEET only,
       attached to the question paper, as per the instructions contained
       therein. PART ONE is NOT to be answered in the answer book.
    3. Maximum time alloted for PART ONE is ONE HOUR. Answer book for
       PART TWO will be supplied at the table when the answer sheet for
       PART ONE is returned. However, candidates, who completes PART ONE
       earlier than one hour, can collect the answer book for PART TWO
       immediately after handling over the answer sheet for PART ONE.

       TOTAL TIME: 3 Hours           Total Marks: 100 (Part I - 40, Part II - 60)
                                     PART ONE
                         Answer all the questions)

1.   Each question below gives a multiple choice of answers. Choose the most
     appropriate one and enter in the 'tear-off' answer sheet attached with the
     question paper, following instructions therein.   (1 x 10)

     1.1 The array is known as
         a) Serial access structure
         b) Random access structure
         c) Hybrid access structure
         d) None of the above

     1.2 A buffer constitutes a
         a) First-in-First-out queue
         b) Last-in-First-out queue
         c) Random order access queue
         d) None of the above

    1.3 In the worst case of Heap sort for N elements, the number of shifts
required is
            a) N
        b) N/2
        c) N/4
        d) None of the above

    1.4 Quick sort is based on the fact that exchanges should preferably be
performed
        a) Over large distance in order to be most effective
        b) Over minimum distance in order to speed up the process
        c) Over distance based on some formula to make it more scientific.
        d) Noen of the above.

     1.5 If an element has no descendants, it is called a
       a) Small tree
         b) Root node
         c) Terminal node
         d) None of the above

     1.6 The number of cycles contained in a tree is
       a) 0
         b) at least 1
         c) Any number
       d) None of the above

    1.7 The process which is faster for threaded trees compared with their
unthreaded counterparts is
        a) Insertion
        b) Deletion
        c) Traversal
        d) None of the above

    1.8 Link of linked list in C is of type
      a) Unsigned integer
        b) Pointer to integer
        c) Pointer to struct
        d) None of the above

    1.9 A vertex with degree one in a graph is called
      a) Leaf
        b) Pendant vertex
        c) End vertex
        d) None of the above

    1.10 Extra space in each record is kept for _______ collision processing
method
       a) Linear
         b) Quadratic
         c) Linked
         d) None of the above

2. Each statement below is either TRUE or FALSE. Choose the most appropriate one
and record
   in the 'tear-off' sheet attached to the question paper.                    (1
x 10)

   2.1 A data types determines a set of values to which a constant belongs, or
which may be
       assumed by a variable or an expression, or which may be generated by an
operator or
       a function.
   2.2 Sequences are used to access data on primary storage.
   2.3 The minimum number of moves in straight exchange sorting method is zero.
   2.4 All perfectly balanced trees are AVL-balanced.
   2.5 Null pointer, in the node, shows that the node is empty.
   2.6 A spanning of a tree is an undirected tree consisting of only those edges
       necessary to connect all the nodes in the original nodes.
   2.7 An ordered tree is a tree in which the branches of each node are ordered.
   2.8 ISAM stands for index storage access method.
   2.9 Multiple hashing uses more than one hashing function to resolve
collision.
   2.10 Breadth first search uses stack, to hold nodes that are waiting to be
processed.

3. Match words and phrases in column X with the closest related
meaning/word(s)/phrases in
   Column Y. Enter your selection in the 'tear-off' answer sheet attached with
the question
   paper, following instrcutions therein.             (1 x 10)
   -----------------------------------------------------------------------------
------------
                     X                                            Y
   -----------------------------------------------------------------------------
------------
       3.1 Standard primitive types                          A. 0 <= n < 2^n
     3.2 CARDINAL number of n bits                           B. 3(n-1)
     3.3 Homogeneous structure                               C. 3n
     3.4 Minimum moves in straight selection sort     D. Spanning tree
     3.5 Bubble sort                                                E. Structure
type
     3.6 Atomic element                                             F. Number of
direct descendant of an
                                                                interior node
       3.7 enumaration                                                    G.
Linear type
       3.8 Degree                                                         H. poor
sorting method
     3.9 Search Tree                                                      I. built
in feature
     3.10 Decision Tree                                             J. Record type
                                                                          K.
Comparison tree
                                                                          L.
scalar type
                                                    M. Lexicographic tree
                                                    N. Array

4. Each statement below has a blank space to fit one of the words or phrases in
the list
   below. Enter your choice in the 'tear-off' answer sheet attached with the
question
   paper, following instructions therein.       (1 x 10)

   a) compile time b) interior c) static d) n e) recursive f) random access
g) increases
   h) back tracking i) dynamic j) runtime k) 1 l) 2n m) 2 n) external
fragmentation
   o) hasing p) decreases    q) internal fragmentation

   4.1 ______ is the one of the common property of both the array and record
structure.
   4.2 The degree of decoupling ____ with increasing buffer size.
   4.3 An object is __________, if it partially consist or is defined in terms
of itself.
   4.4 Allocation of store to individual components at the time when they come
into
       existence during program execution is __________ allocation of storage.
   4.5 The node of a tree which is not terminal is a(n) _______ node.
   4.6 A tree is perfectly balanced, if for each node the number of nodes in its
left and right
         subtrees differ by at most ______.
   4.7 The phenomenon of decomposing the total available into a large number of
relatively small
       blocks is called ________.
   4.8 __________ memory allocation is known as dynamic memory allocation.
   4.9 In B-trees, every page contains at most __________ items(keys).
     4.10 Depth first search is also called ___________.



                                                  PART TWO
                    (Answer any FOUR questions; each question carries 15 marks)

5. Write a program that combines the Quicksort and Bubblesort algorithms as
follows:
   Use quicksort to obtain (unsorted) partitions of length m (1 <= m <= n); then
   use Bubblesort to complete the task.

6. Write note on:
   a) Matrix representation of graph     b) List structure.

7. A bidirectional list is a list of elements that are linked in both ways. Both
links
   are originating from a header. Construct a module with procedures for
searching,
   inserting and deleting elements.
8. What is B-tree? Write a program for the insertion of a key in a binary B-
tree.

9. Write short note on:
   a) Application of graphs in Computer Science    b) Circular Queue

--------------------------------------------------------------------------------

B1.4: Programming and Problem Solving through C language - July 2000

Note:
    1. There are TWO PARTS in this module/paper.
    2. PART ONE is to be answered in the TEAR-OFF ANSWER SHEET only,
       attached to the question paper, as per the instructions contained
       therein. PART ONE is NOT to be answered in the answer book.
    3. Maximum time alloted for PART ONE is ONE HOUR. Answer book for
       PART TWO will be supplied at the table when the answer sheet for
       PART ONE is returned. However, candidates, who completes PART ONE
       earlier than one hour, can collect the answer book for PART TWO
       immediately after handling over the answer sheet for PART ONE.

        TOTAL TIME: 3 Hours           Total Marks: 100 (Part I - 40, Part II - 60)
                                      PART ONE
                          Answer all the questions)

1.    Each question below gives a multiple choice of answers. Choose the most
      appropriate one and enter in the 'tear-off' answer sheet attached with the
      question paper, following instructions therein.   (1 x 10)

      1.1 Which one of the following statement is incorrect?
        a) A compiler compiles the source program
          b) An assembler takes an assembly program as input
          c) A compiler does the same tpe of function as interpreter
          d) None of these

      1.2 'C' is a
        a) completely high level language
           b) completely low level language
           c) high level language with low level features
           d) none of these

    1.3 An external variable is one
      a) which is globally accessible by all functions
        b) which is declared outside the body of any function
        c) which resides in the memory till the end of the program
        d) all of the above

    1.4 Study the following program:
      #include <stdio.h>
        main()
        {
            int i, n=2;
                  for (i=0; i<2;i++)
            {
                  if (!(i<=n)&&(++n==i)) n=n+2;
                else n=n-2;
              }
          }

            What will be the value of 'n' after the execution of above program?

            a) 3    b) 2     c) 4   d) none of these

    1.5 Study the following program:
            #include <stdio.h>
        #define F(a,b) (a+b)*(a*a+2*a*b+b*b)
        main()
        {
            int i, j, sum;
                  i=j=sum=1;
            for(i=0;i<2;i++) sum = sum + F(i,j);
                  printf("\n Sum = %d"", sum);
          }

            What will be the value of the 'sum' after the execution of above
program?

            a) 11    b) 12     c) 10   d) none of these

    1.6 Study the following program:
      #include <stdio.h>
        main()
        {
            int a, *b=&a, **c=&b;
            a=2;
            **c=2;
            b=(int*) **c;
            printf("A = %d, B=%d", a, *b);
          }

            What will be the output of the above program?

            a) A=2, B=1
            b) A=2, B=2
        c) A=2, B=0
        d) none of these

   1.7 Study the following C program:
     #include <stdio.h>
       main()
       {
           int sum=1, count=1;
           do {
                  count--;
                sum = 3 * sum;
            } while (count > 5);
         }

        what will be the value of the variable 'sum' after the execution of the
above program?

       a) 1   b) 0   c) 3   d) none of these

   1.8 Study the following statements:
     #include <stdio.h>
       #include <string.h>
       main()
       {
           char *st1, *st2, *st3;
           st1 = "India is My ";
           st2 = "!!yrtnuoC";
           st3 = "Gujarat";
           clrscr();
           strncat(st1,strrev(st2),strlen(st3));
           puts(st1);
         }

        what will be output of the above program?

         a) India is My Country
         b) India is My Gujarat
         c) India is My Country!!
         d) None of these
     1.9 Recursive functions are executed in
     a) Last in first out order
       b) First in last out order
       c) Parallel fashion
       d) Any of the above
   1.10 Study the following C program:
     #include <stdio.h>
       int a, i=4, fsum=0;
       main()
       {
            for(;i>0;--i) fsum=fsum+fact(i);
         }
         fact(i);
         {
            if (i==1)
                  return(1);
            else
                  return(i * fact(i-1));
            }

           What will be the value of fsum after the execution of the above
program?

           a) 35   b) 32   c) 33   d) none of the above

2. Each statement below is either TRUE or FALSE. Choose the most appropriate one
and record
   in the 'tear-off' sheet attached to the question paper.                    (1
x 10)

   2.1 In 'C', the bitwise operators can be applied to integer type operands
only.
   2.1 A file can be rewound by the following statement:
            fseek(fp, 0L, 0);
        where fp is a file pointer.

   2.3 A file can contain the null character as part of its actual data, whereas
a string
       cannot.
   2.4 The statement:
            Char(*(*z())[])();

        Indicates that "z is a function returning a pointer to an array of
pointers to
        functions returning char".
   2.5 In a 'C' program, headers may be included in any order any numbers of
times.
   2.6 void filecopy(FILE1*, FILE*); is a valid function declaration statement.
   2.7 The conversion specification %h is used to read values in hexadecimal
format.
   2.8 An if statement may contain compound statements only in the else clause.
   2.9 It is possible to declare and initialise an array in 'C' simultaneously.
   2.10 A pointer variable can be at most two levels deep.

3. Match words and phrases in column X with the closest related
meaning/word(s)/phrases in
   Column Y. Enter your selection in the 'tear-off' answer sheet attached with
the question
   paper, following instrcutions therein.             (1 x 10)

   -----------------------------------------------------------------------------
------------
                    X                                            Y
   -----------------------------------------------------------------------------
------------
       3.1 To issue DOS command                                    A. <string.h>
    3.2 int (*p)[25]                                               B. address
operator
    3.3 '\0'                                                             C. are
slower
    3.4 isalpha()                                                  D. 3
    3.5 <<                                                               E.
<stdlib.h>
    3.6 operations on register                                     F. <ctype.h>
    3.7 &&                                                               G. 5
    3.8 malloc()                                                    H. bitwise
left shift
    3.9 int *p[25]                                                         I.
Character with value 0
    3.10 5 % 3 * 5 / 3                                              J. system()
                                                                          K. is
pointer to an array of integer pointer
                                                      L. are faster
                                                      M. bitwise AND operator
                                                      N. p is a pointer to an
array of integers

4. Each statement below has a blank space to fit one of the words or phrases in
the list
   below. Enter your choice in the 'tear-off' answer sheet attached with the
question
   paper, following instructions therein.       (1 x 10)

   a) & b) Double c) 65 times Test d) Auto e) False f) different g)
Recursion
   h) Procedure i) && j) Expression k) Nested if l) Switch m) Single n)
same
   o) AAAA p) True q) Equality r) Inequality s) ->* t) Te65 u) Extern

   4.1 A character constant is a sequence of one or more characters enclosed in
_____ quotes.
   4.2 An _________ variable comes into existence when the function in which it
is declared
       is executed.
   4.3 An ________ consists of one or more constants, variables, function calls
or operations.
   4.4 If numeric or single-character information is being entered by means of
the scanf()
       function _______ symbol must precede the corresponding variable name.
   4.5 _______ is technique whereby a function calls itself.
   4.6 The logical operator == checks for _______ of two values.
   4.7 A ___________ statement is used to choose from multiple possibilities
which may arise due to
       different values of a single variables.
   4.8 The condition (0||1&&1&&0) will give result as ______ value.
   4.9 The statement 'puts(strset("TeSt", 65));' will give result as ________.
   4.10 Operators &, ^ == have _________ precedence.

                                                        PART TWO
                    (Answer any FOUR questions; each question carries 15 marks)

5. Write a function to accept two strings st1 & st2 and find out the number of
words(w1) in
   st1 and (w2) in st2.

   Now, return 0    if W1 = W2
              -1    if W1 < W2
               1    if W1 > W2

6. You are given a linked list pointed out by start of nodes having node
structures as
   {inf, link}. write set of statements in 'C' for the following:
     a) Delete last node
     b) Insert a node in the beginning
     c) Count the number of nodes in a list

7. Write a C program to do the following task:

   a) Read any string, say ST1 of the maximum length 80. Note that it consists
of only
       upper alphabets or lower alphabets or mixing of both and one or more blank
space.
   b) Find out the frequency of each word in ST1. Words are separated by one or
more
       spaces.
   c) Display each word with their corresponding frequency in the increasing
order of
       frequency.

8. Write a recursive function in 'C' to reverse the digits of an integer
(eg:1234 => 4321)

9. The Highest Common Factor (HCF) of two or more numbers can be determined by
the
    division method. The method has following steps:
    Step 1: The greater number is first divided by the smaller one.
    Step 2: The remainder is then treated as the divisor and the first divisor as
            dividend.
    Step 3: Repeat steps 1 & 2 till the remainder is zero.
    Step 4: The last devisor is the HCF of the given numbers.

   Write a C program to find the HCF of two numbers using the above method.
--------------------------------------------------------------------------------
------------------
B2.52: Introduction to Object-Oriented Programming and C++/Visual C++ - July
2000

Note:
    1. There are TWO PARTS in this module/paper.
    2. PART ONE is to be answered in the TEAR-OFF ANSWER SHEET only,
       attached to the question paper, as per the instructions contained
       therein. PART ONE is NOT to be answered in the answer book.
    3. Maximum time alloted for PART ONE is ONE HOUR. Answer book for
       PART TWO will be supplied at the table when the answer sheet for
       PART ONE is returned. However, candidates, who completes PART ONE
       earlier than one hour, can collect the answer book for PART TWO
       immediately after handling over the answer sheet for PART ONE.

        TOTAL TIME: 3 Hours           Total Marks: 100 (Part I - 40, Part II - 60)
                                      PART ONE
                          Answer all the questions)

1.    Each question below gives a multiple choice of answers. Choose the most
      appropriate one and enter in the 'tear-off' answer sheet attached with the
      question paper, following instructions therein.   (1 x 10)

      1.1 Consider the following class definition
        class X
       {
                 private:
                       int j;
                 protected:
                       int k;
                 public:
                       int a;
                     int X() { j=0;k=0;a=0;}
           };

        Let f(X x) be any global function which is not a friend of class 'X'.
Which of the
        following statement would be legal inside the definition of 'f'?
        a) (x.j)++;
        b) (x.k)++;
        c) (x.a)++;
        d) None of the above
   1.2 "X" is a publicly derived class of 'Y'. Both the classes have no-arg
constructors.
       Consider the following definitions:

                X *px; X x;
                Y *py; Y y;

                Which of the following statement is correct?

      a) px = &y;
      b) py = &x;
      c) px = py;
      d) More than one in the above is correct.
  1.3 Consider the following three function prototypes.
      i) int f(int);
      ii) int f(float);
      iii) int f(long);

      if f('a') is invoked then which function would be called?

      a)    Function    (i)
      b)    Function    (ii)
      c)    Function    (iii)
      d)    The call    is ambiguous

  1.4 Let an array of integers be defined as follows:

                 int *a = new int[20];

       Which of the following statements would delete all integers allocated in
the previous statement?

      a)    delete    a;
      b)    delete    a[];
      c)    delete    []a;
      d)    delete    a[20];

  1.5 A class X has a constructor as shown below:
        class X
      {
                         public:
                         int k;
                     X(int i=5)
                     {
                         k=i;
                       }
        }
      Which of the following statement would not correctly create an object 'a'

      a)    X    a(7);
      b)    X    *a = new X();
      c)    X    *a = new X(5);
      d)    X    a();

   1.6 Which of the following declarations of reference type variables is
flawless?
          a) int &a;
       b) int x; int &a = &x;
       c) int b=5; int &x = b;
       d) float b; int &x = b;
   1.7 When one object initializes another object the following function is
invoked.
       a) new
       b) copy constructor
       c) instantiation
       d) init
   1.8 Which of the following function prototypes is in-correct?
       a) int f(inti, int j);
       b) int f(int i=0;int j=5);
       c) int f(int i=0; int j);
       d) int f(inti, int j=5);
   1.9 When an object of a derived class is destroyed then
          a) only the destructor of the base class is called.
       b) only the destructor of the derived class is called.
       c) first the destructor of the base class is called and then the
destructor
           of the derived class is called.
       d) first the destructor of the derived class is called and then the
destructor
           of the base class is called.
   1.10 Let 'i' be a public static integer member of a class 'X' and 'a', 'b'
are objects
         of type 'X'. Which of the following statement is not a valid way to
access 'i'?

       a)       a.i
       b)       b.i
       c)       X::i
       d)       None of the above

2. Each statement below is either TRUE or FALSE. Choose the most appropriate one
and record
   in the 'tear-off' sheet attached to the question paper.                    (1
x 10)

  2.1 Writing a constructor and destructor is mandatory while defining a class.
  2.2 No arguments can be passed to a destructor.
   2.3 Declaring a constructor as virtual is incorrect.
   2.4 Virtual functions of the base class cannot be overwritten in a derived
class.
   2.5 It is logically correct to return a reference to a local variable from a
function.
   2.6 'cout' is an object of the class 'iostream'.
   2.7 If assignment operator of a class is overloaded then that class is most
likely to contain a
       definition of the copy constructor.
   2.8 Precedence of an operator may not be changed by overloading that
operator.
   2.9 All operators may be overloaded using friend function.
   2.10 Calls to inline functions are always expanded by the compiler.

3. Match words and phrases in column X with the closest related
meaning/word(s)/phrases in
   Column Y. Enter your selection in the 'tear-off' answer sheet attached with
the question
   paper, following instrcutions therein.             (1 x 10)

   -----------------------------------------------------------------------------
------------
                   X                                             Y
   -----------------------------------------------------------------------------
------------

   3.1 A class, all member functions of                              A. try-catch
block
       which are friend functions of a class
   3.2 Same function name with different                     B. break statement
       signature
   3.3 Initialization of an array of objects                   C. Exact match
   3.4 Operator used/overloaded for input stream               D. WM_MOUSEMOVE
   3.5 Run-time binding                                                    E. <<
   3.6 Generic functions                                                   F.
Friend function
   3.7 Overloaded function call resolution                           G. Virtual
function
   3.8 Better macros                                                       H.
Overloading
   3.9 Exception handling                                                  I.
Default constructor
   3.10 Windows Mouse message                                        J. Default
argument

     K. WM_MOUSEOVER
                                                        L.    Function templates
                                                        M.    Friend class
                                                        N.    >>
                                                        O.    WS_MOUSEMOVE
                                                        P.    Inline functions

4. Each statement below has a blank space to fit one of the words or phrases in
the list
   below. Enter your choice in the 'tear-off' answer sheet attached with the
question
   paper, following instructions therein.       (1 x 10)
   a) ++() b) ++(int) c) public d) protected e) static      f) non-static     g)
default
   h) private i) X j) X & k) command l) friend m) pure      n) catch all o)
catch (...)
   p) X **

   4.1 'operator ________ ' is an overloaded function for post-increment
operator.
   4.2 Functions of a class derived from another class 'X' cannot use any ___
member
        of 'X'.
   4.3 The type of the only argument in the copy constructor of a class 'X' is
______.
   4.4 _____ members of a class may be accessed by functions defined in its
derived classes
        but these members are not accessible for all global functions.
   4.5 Static member functions of a class cannot access _______ members.
   4.6 'struct' is a class where members are by default ____.
   4.7 Abstract classes contain one or more _____ virtual functions.
   4.8 Exceptions of all types can be handled in _______ block.
   4.9 On selecting a menu, a _____ event message is sent to window message
queue.
   4.10 Formal parameters in a function may be given ________ values.

                                                            PART TWO
                                          (Answer any FOUR questions)

5. Suppose that a text file is to be read and a table is to be constructed such
that each
   row in that table contains a word (occuring in the text file) and the number
of times
   the word occurs in the text file. Write a C++ program for this purpose. For
simplicity,
   assume that a word is a sequence of alphanumeric characters delimited by '.',
',', blank
   and 'n' characters. Further assume that a word cannot be more than 10
characters long
   and there are a maximum of 100 words in the file. Define the necessary
classes and
   their member functions.
                              (15)

6. Suppose that you need to define classes for employee and manager objects. An
employee
   has a name, an employee code, salary and age. A manager is also an employee.
But a
   manager object contains an additional list of references to employee objects
whome
   the manager supervises. An employee object should also contain a reference to
   his/her manager. A manager can supervise at most 10 employees. It is required
to print
   the details of an employee or a manager. When information of an employee
object is
   printed, his/her name, salary and age are displayed. When information of the
manager
   is printed, his/her name, age, salary and the names of all employees that
he/she
   currently supervises are displayed. Define the classes 'employee' and
'manager'
   keeping the following additional points in mind:

   * references to employee objects can be added and deleted from the list of
supervised
     employees in a manager object.
   * referece to the manager object can be modified for an employee object.

                                          (15)
7. Consider class 'String' where each 'String' object contains an array of
characters
   and the length of the string. Write member functions for

   * Initializing a string object either by a given string constant(e.g: 'abc')
or by
      an integer specifying the maximum size of string to be accommodated or by
another
      string object.
   * Overloading the assignment operator.
   * Overloading comparison operator == so that a string object may be compared
with
      another string object and a string constant may be compared with a string
object.

                              (6+5+4)
8. Write the definition of a class template for implementing a list of objects
of various
   types. Consider that the list is to be implemented as a linked list using
pointers where
   each node contains data of different types and a pointer to the next element.
That is, each
   node is also a template class. A list object contains a pointer to the first
node. Your
   implementation must support the following:

   * Initializing an empty list object with no node.
   * Adding a node at the end of the list given the data of the node as an
argument to
     the 'add' function.
   * Deletion of the first element of the list and returning the data content of
that element.

                                    (3+4+4+4)
9. Write short note on any three of the following:

   a)   Virtual destructor
   b)   Static members
   c)   Overloading the sub-script operator
   d)   Message box

                                    (3 x 5)
--------------------------------------------------------------------------------
----------------------
B1.3: Computer Organization and System Software - July 2000
Note:
    1. There are TWO PARTS in this module/paper.
    2. PART ONE is to be answered in the TEAR-OFF ANSWER SHEET only,
       attached to the question paper, as per the instructions contained
       therein. PART ONE is NOT to be answered in the answer book.
    3. Maximum time alloted for PART ONE is ONE HOUR. Answer book for
       PART TWO will be supplied at the table when the answer sheet for
       PART ONE is returned. However, candidates, who completes PART ONE
       earlier than one hour, can collect the answer book for PART TWO
       immediately after handling over the answer sheet for PART ONE.

        TOTAL TIME: 3 Hours           Total Marks: 100 (Part I - 40, Part II - 60)
                                      PART ONE
                          Answer all the questions)

1.    Each question below gives a multiple choice of answers. Choose the most
      appropriate one and enter in the 'tear-off' answer sheet attached with the
      question paper, following instructions therein.   (1 x 10)

      1.1 The number of memory location that a CPU with a 16bit program counter
can
         address

          a) 16K
          b) 32K
          c) 64K
          d) 256K
      1.2 Booth's algorithm for computer arithmetic is used for
          a) multiplication of numbers in sign magnitude form.
          b) multiplication of numbers in two's complement form.
          c) division of numbers in sign magnitude form.
          d) division of numbers in two's complement form.
      1.3 Micro-instructions are kept in
        a) main memory
          b) control store
          c) cache
          d) none of these
      1.4 A machine using base register addressing method has 'n' base registers
and
         displacement contains K bits, programmer can access any

          a) n regions of K addresses each
          b) 2^n regions of 2^K addresses each
          c) n regions of 2^K addresses each
          d) None of these
      1.5 In assembly programming, the directives to assemblers are referred as
          a) imperative statement
          b) declarative statement
          c) pseudo operation
          d) none of these
      1.6 The last statement of any Symbolic Microprogram must contain
          a) NEXT
          b) OVER
          c) FETCH
          d) INDRCT
      1.7 -2^15 is represented in 2's complement notation as
        a) 1000 0000 0000 0000
        b) 1000 0000 0000 0001
        c) 1111 1111 1111 1111
        d) None of these
    1.8 When DMA module needs to use bus, CPU is just suspended and CPU
        a) saves a context as it does at interrupt time
        b) goes on HOLD for 1 bus cycle
        c) helps DMA module in its work
        d) none of these
    1.9 Virtual memory system allows the employement of
      a) more than address space
        b) the full address space
        c) more than hard disk capacity
        d) none of these
    1.10 Building of the symbol table in assembly process is done in
      a) synthesis phase
        b) analysis phase
        c) analysis as well as in synthesis phase
        d) none of these


2. Each statement below is either TRUE or FALSE. Choose the most appropriate one
and record
   in the 'tear-off' sheet attached to the question paper.                    (1
x 10)

   2.1 ab` + cb + ac can be reduced to ab` + cb.   (Note: b` should be read as
Bar over b.)

   2.2 Concept of micro-operation serves as a guide to the design of the control
unit.
   2.3 MAR of control store is micro-program counter.
   2.4 In instruction pipelining, if fetch and execution instruction stages are
of equal
        duration, the instruction cycle time will be halved and it will always
result the
        doubling of execution rate.
   2.5 Unlike subroutines, we cannot pass parameters to macros.
   2.6 Reading a microinstruction from the control memory is same as executing
that
        microinstruction.
   2.7 Booth's algorithm performs more additions and subtractions than straight
forward
        multiplication algorithm.
   2.8 When DMA request is received from an I/O device, CPU completes the
present machine
        cycle.
   2.9 A tag directory is needed in cache memory organization.
   2.10 Loader only relocates program to execute from the specific memory area
allocated to it.


3. Match words and phrases in column X with the closest related
meaning/word(s)/phrases in
   Column Y. Enter your selection in the 'tear-off' answer sheet attached with
the question
   paper, following instrcutions therein.             (1 x 10)
   -----------------------------------------------------------------------------
------------
                    X                                            Y
   -----------------------------------------------------------------------------
------------
       3.1 Universal logic gates                                          A. Stack
    3.2 Nibble                                                                   B.
Register
    3.3 Daisy Chaining                                                    C. NAND
and NOR
    3.4 LIFO                                                                     D.
A string of 4 bits
    3.5 Whose value does not change during execution    E. XOR
         of the program
    3.6 Synchronous Communication                                  F. MAR
    3.7 Seek time                                                         G. Block
mode transmission
    3.8 DMA                                                                      H.
EBCDIC
    3.9 LRU                                                                      I.
Constant
    3.10 Shifter                                                          J.
Variable
                                                                              K.
Interrupt priority
                                                        L. Hard Disk Drive
                                                        M. Page Replacement
policy
                                                        N. Logical Shift
                                                        O. Cycle Stealing
                                                        P. Flip Flops

4. Each statement below has a blank space to fit one of the words or phrases in
the list
   below. Enter your choice in the 'tear-off' answer sheet attached with the
question
   paper, following instructions therein.       (1 x 10)

      a) Program counter   b) decoder   c) Instruction register   d) multiplexer   e)
NOR
      f) wasteful g) desired   h) Branch i) XOR j) is  k) -1024 to 1023
      l) Lexical analyzer m) Parser n) .8 o) .9 p) DMA q) Programmed I/O
      r) -512 to 511 s) Object file t) horizontal


   4.1 A circuit capable of accepting 'n' variable input and generating the
       corresponding output signal on any of 2^n output lines is called
________.
   4.2 _______ holds the last instruction fetched.
   4.3 Logical functions of two variables are usually implemented by NAND and
_______ gates.
   4.4 A longer instruction length may be _________.
   4.5 The performance of an instruction pipeline is adversely affected by
________ instructions.
   4.6 In a compiler, syntax errors are checked by ___________.
   4.7 The range of integers that can be represented using 10 bit two's
complement representation
       is __________.
   4.8 ______ is far more faster than interrupt driven I/O.
   4.9 In a two level memory hierarchy, the cache hit ratio must be __________
so that average
       access time is 12ns with cache memory access time 8ns and main memory
access time 40ns.
   4.10 In computer, the job of recognizing that 'if' is a keyword, is that of
_________.

                                                            PART TWO
                                          (Answer any FOUR questions)

5. a) Explain in detail what functions are performed in analysis phase of an
assembly
      process and what data structures are used in it.
   b) What is linking? Why is it required in making the program executable?

                                    (8+7)
6. a) How does operating system perform resource allocation function? Explain
      static allocation and dynamic allocation.
   b) What are major issues in code generation for expression? Explain them.

                                    (8+7)
7. a) How are floating point numbers represented internally in computer? Can it
      handle zero?
   b) Using any hypothetical computer, develop the symbolic program for ADD
instruction.

                                     (6+9)
8. a) Show how cache memory may be organized in a computer.
   b) Write an assembly program segment to read a text consisting of several
lines,
       not to exceed 250 characters in all. Find the number of characters and
number
       of lines in the text and store them in NUMCHAR and NUMLINE respectively.

                                    (6+9)
9. a) Present a scheme for handling priority between interrrupts.
   b) Design a combinational circuit with 3 inputs x, y, z and 3 outputs A, B,
C.
      When input is 0, 1, 2 or 3 (in binary form) the binary output is one more
than
      the input. Otherwise, the binary output is one less than input.

                                    (6+9)
--------------------------------------------------------------------------------
-----------------

								
To top