Placement Paper 2

18 Questions

Settings
Please wait...
Paper Quizzes & Trivia

Questions and Answers
  • 1. 
    Under what conditions a destructor destroys an object?
    • A. 

      Scope of existence has finished

    • B. 

      Object dynamically assigned and it is released using the operator delete.

    • C. 

      Program terminated.

    • D. 

      Both a and b.

  • 2. 
    Which type of class has only one unique value for all the objects of that same class?
    • A. 

      This this

    • B. 

      Friend

    • C. 

      Static

    • D. 

      Both a and b

  • 3. 
    For which type of class private and protected members of the class can be accessed from outside the same class in which they are declared
    • A. 

      No such class exist

    • B. 

      Friend

    • C. 

      Static

    • D. 

      Virtual

  • 4. 
    Which of the following cannot be inherited from the base class?
    • A. 

      Constructor

    • B. 

      Friend

    • C. 

      Both a and b cannot be inherited

    • D. 

      Both a and b can be inherited

  • 5. 
    What is a virtual member?
    • A. 

      A member of a friend class that can be redefined in its derived classes

    • B. 

      A member of a virtual class that cannot be redefined in its derived classes

    • C. 

      A member of a static class that can be redefined in its derived classes

    • D. 

      A member of a class that can be redefined in its derived classes

  • 6. 
    Can inline functions be used to improve performance?
    • A. 

      Yes

    • B. 

      No

    • C. 

      Yes, depends on the situation

    • D. 

      Both a and b

  • 7. 
    #if or #elif can be used to evaluate
    • A. 

      Constant expressions

    • B. 

      Macro expressions

    • C. 

      Both a and b

    • D. 

      All expressions

  • 8. 
    Ios::ate is used for
    • A. 

      Set the initial position at the end of the file.

    • B. 

      Set the initial position at the start of the file.

    • C. 

      Set the last position at the end of the file.

    • D. 

      Set the last position at the start of the file.

  • 9. 
    Difference between logical from physical address space is
    • A. 

      Well, there is no difference at all!

    • B. 

      Physical address is logic in the program and Logical address is code where things execute.

    • C. 

      Logical address is the address that is generated by the CPU user thinks, physical address is the address that is seen by the memory unit.

    • D. 

      Physical address is address given by compiler and logical address is assigned by user.

  • 10. 
    Page fault occures when
    • A. 

      The page is not in the memory

    • B. 

      The page is in the memory

    • C. 

      The process is killed

    • D. 

      The process is in the ready state

  • 11. 
    Bankers algorithm is used
    • A. 

      To rectify a deadlocked state.

    • B. 

      To detect deadlock in OS

    • C. 

      To prevent deadlock in OS.

    • D. 

      None of the above

  • 12. 
    Thrashing occurs ...
    • A. 

      When no swapping takes place

    • B. 

      When you thrash your computer

    • C. 

      Whenever deadlock occurs

    • D. 

      When excessive swapping takes place

  • 13. 
    Which of the following commands is not a filter?
    • A. 

      Man

    • B. 

      Cat

    • C. 

      Pg

    • D. 

      Head

  • 14. 
    Which data structure allows deleting data elements from front and inserting at rear?
    • A. 

      Stacks

    • B. 

      Queues

    • C. 

      Deques

    • D. 

      Binary search tree

  • 15. 
    Which of the following data structure is non-linear type?
    • A. 

      Strings

    • B. 

      Lists

    • C. 

      Stacks

    • D. 

      None of above

  • 16. 
    An algorithm that calls itself directly or indirectly is known as
    • A. 

      Sub algorithm

    • B. 

      Recursion

    • C. 

      Polish notation

    • D. 

      Traversal algorithm

  • 17. 
    If every node u in G is adjacent to every other node v in G, A graph is said to be
    • A. 

      Isolated

    • B. 

      Complete

    • C. 

      Finite

    • D. 

      Strongly connected

  • 18. 
    In a Heap tree
    • A. 

      Values in a node is greater than every value in left sub tree and smaller than right sub tree

    • B. 

      Values in a node is greater than every value in children of it

    • C. 

      Both of above conditions applies

    • D. 

      None of above conditions applies