Online Test for C++

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

  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. Which of the following is user defined data type?
    Public
    Private
    Class
    A & B Both

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

  1. Member of a class specified as _______ are accessible only to method of the class.
    private
    public
    protected
    derive

  1. If class A inherits from more than one class, ie. A inherits from B1, B2,... is called
    Single Inheritance
    Multilevel Inheritance
    Multiple Inheritance
    None of the above


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

  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 of the following correctly describes overloading of functions?
    Virtual polymorphism
    Transient polymorphism
    Ad-hoc polymorphism
    Pseudo polymorphism

  1. Which of the following cannot be passed to a function in C++?
    Constant
    Structure
    Array
    Header file

Post Your Question
Social Sharing
Search