Online Examination System 2012

20 Questions

Settings
Online Exam Quizzes & Trivia

Hello Every Student? ? ?


Questions and Answers
  • 1. 
    Consider a linked list implemented of a queue with two pointers: front and rear. What is the time needed to insert element in a queue of length of n? 
    • A. 

      O(log2n)

    • B. 

      O(n).

    • C. 

      O(n log2n).

  • 2. 
    Time taken for addition of element in queue is 
    • A. 

      None of these

    • B. 

      O(n)

    • C. 

      O(n)

  • 3. 
    The statement that tests to see if sum is equal to 10 and total is less than 20, and if so, prints the text string "incorrect.", is 
    • A. 

      if( (sum = 10) && (total < 20) )printf(

    • B. 

      if( (sum == 10) && (total < 20) )printf(

    • C. 

      if( (sum == 10) ¦¦ (total < 20) )printf(

  • 4. 
    Consider a linked list of n elements. What is the time taken to insert an element pointer ? 
    • A. 

      O(n log2n)

    • B. 

      O(nlogn)

    • C. 

      N log n

  • 5. 
    Which is a logical abstract base class for a class called "footballPlayer"? 
    • A. 

      Tenis

    • B. 

      Team.

    • C. 

      Cricket

  • 6. 
    Can two classes contain member functions with the same name? 
    • A. 

      No

    • B. 

      Sometimes

    • C. 

      Yes, but only if the two classes have the same name.

  • 7. 
    A derived class is
    • A. 

      Inherits data members and member functions from base class.

    • B. 

      Object can access protected members with the dot operator.

    • C. 

      Inherits data members and member functions from base class as well as Inherits constructors and destructor.

  • 8. 
    _________is a relationship 
    • A. 

      Polymorphism

    • B. 

      Inheritance

    • C. 

      OverLoading

  • 9. 
    Which is a logical abstract base class for a class called "CricketPlayer"? 
    • A. 

      Team

    • B. 

      Sports

    • C. 

      Cricket

  • 10. 
    Maintaining the state of an object is called____. 
    • A. 

      Serialization

    • B. 

      Persistence

    • C. 

      Marshalling

  • 11. 
    ______ means that both the data and the methods which may access it are defined together in the same unit. 
    • A. 

      Data hiding.

    • B. 

      Encapsulation

    • C. 

      Data Binding

  • 12. 
    If a catch statement is written to catch exception objects of a base class type, it can also catch all _____ derived from that base class 
    • A. 

      Object

    • B. 

      Class

    • C. 

      Exceptions for objects

  • 13. 
    Association in UML can be represented by: 
    • A. 

      A plane line with no shape on either end.

    • B. 

      Diamond shape between classes.

    • C. 

      A line with an arrow-head pointing in direction of parent or superclass.

  • 14. 
    Suppose that the Test class does not have an overloaded assignment operator. What happens when an assignment a=b; is given for two Test objects a and b? 
    • A. 

      The automatic assignment operator is used

    • B. 

      The copy constructor is used

    • C. 

      Run-time error

  • 15. 
    Peer-to-peer relationship is a type of _________. 
    • A. 

      1) Association

    • B. 

      2) Aggregation

    • C. 

      3) Link

  • 16. 
    An application uses encapsulation to achieve ________
    • A. 

      Information hiding

    • B. 

      Make implementation independent

    • C. 

      Minimizing interdependencies among modules

  • 17. 
    A class is_____ 
    • A. 

      Data Type

    • B. 

      Abstract Type

    • C. 

      User Defined Type

  • 18. 
    Can two classes contain member functions with the same name?
    • A. 

      No.

    • B. 

      Yes, but only if the main program does not declare both kinds.

    • C. 

      Yes, this is always allowed.

  • 19. 
      In object orientated programming a class of objects can _____________ properties from another class of objects 
    • A. 

      Utilize

    • B. 

      Inherit

    • C. 

      Adapt

  • 20. 
    Reusability can be achieved through. 
    • A. 

      Inheritance.

    • B. 

      Composition.

    • C. 

      Association.