Online Test for C++

  1. In c++ object of the class is also called?
    Constants
    Tag
    Instance
    Data collection

  1. ________ is the mechanism which allows a class A to inherit properties of a class B.
    Data abstraction
    Encapsulation
    Inheritance
    Polymorphism


  1. Global Variables can be access ?
    Anywhere in the code except inside functions. After it's declaration.
    Anywhere in the code, even inside functions. After it's declaration.
    Nowhere in the code
    None of the above

  1. Which of the following is not a member of class?
    Static function
    Friend function
    Const function
    Virtual function

  1. Which of the following correctly describes overloading of functions?
    Virtual polymorphism
    Transient polymorphism
    Ad-hoc polymorphism
    Pseudo polymorphism

  1. The mechanism that binds code and data together and keeps them secure from outside world is known as
    Abstraction
    Encapsulation
    Inheritance
    Polymorphism


  1. Sub classes may also be called Child classes/Derived classes.
    True
    False

  1. What is a size of empty class in c++?
    4 bytes
    2 bytes
    0 bytes
    1 bytes

  1. It is not possible to achieve inheritance of structures in c++?
    True
    False

  1. Which of the following concepts means adding new concepts to a program as it runs?
    Data hiding
    Dynamic loading
    Dynamic typing
    Dynamic binding

Post Your Question
Social Sharing
Search