Online Test for C++

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

  1. Which diagram provides a formal graphic notation for modelling objects, classes and their relationships to one another?
    Object Diagram
    Analysis Diagram
    Instance Diagram
    Class Diagram


  1. _________ allows to create classes which are derived from other classes, so that they automatically include some of its "parent's" members, plus its own members.
    Overloading
    Inheritance
    Polymorphism
    Encapsulation

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

  1. Which of the following operators can not be overloaded in C+ +?
    *
    ==
    +=
    ::

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


  1. Data members is also called?
    Attribute
    Method
    Class
    Object

  1. Which of the following storage classes have global visibility in C++?
    Register
    Static
    Auto
    Extern

  1. Important advantage of using new and delete operators in C++ is
    Allocation of memory
    Frees the memory previously allocated
    Allocation of memory and frees the memory previously allocated
    Initialization of memory easily

  1. Which of the following mode declaration is used in C++ to open a file for input?
    ios :: app
    in :: ios
    ios :: in
    ios :: file

Post Your Question
Social Sharing
Search