Online Test for C++

  1. When a method in a subclass has the same name and type signatures as a method in the superclass, then the method in the subclass _____ the method in the super class.
    Overloads
    Friendships
    Inherits
    Overrides

  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. If class A inherits from class B, then B is called _______ of A. A is called ________ of B.
    Super class, Sub class
    Subclass, Super class
    Abstract class, Base Class
    Child class, Sub Class

  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. C++ actually supports the following two complete dynamic systems?
    One defined by C++ and the other not defined by C
    One defined by C and one specific to C++
    Both are specific to C++
    Both of them are improvements of C

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


  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. The goal of operator overloading is __________.
    To help the user of a class
    To help the developer of a class
    To help define friend function
    None of the above

  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

Post Your Question
Social Sharing
Search