Online Test for C++

  1. Who is father of C++ Language?
    Dr. E.F. Codd
    James A. Gosling
    Bjarne Stroustrup
    Dennis Ritchie

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


  1. The constructor without parameter is called?
    Method Constructor
    Default Constructor
    Operator Constructor
    Function Constructor

  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

  1. Which of the following operator(s) cannot be overloaded?
    . (Member Access or Dot operator)
    ?: (Ternary or Conditional Operator )
    :: (Scope Resolution Operator)
    All of the above

  1. C++ can be said to be as C language with
    Structures
    Functions
    Classes
    Global data


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

  1. ________ is a default access specifier for members of class in C++.
    protected
    public
    private
    default

  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. In c++ object of the class is also called?
    Constants
    Tag
    Instance
    Data collection

Post Your Question
Social Sharing
Search