Online Test for C++

  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 statements is correct?
    First time method of a class is called, the constructor method is called.
    Every time method of a class is called, the constructor method is called.
    Every time an instance of a class is created, the constructor method is called.
    None of the above


  1. A Class can have how many destructor?
    1
    2
    3
    4

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

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

  1. In C++ every statement end with?
    Colon (:)
    Comma (,)
    Dot (.)
    None of the above


  1. What features make C++ so powerful?
    Easy implementation
    Code reusability
    Easy memory management
    All the above

  1. What is pointer?
    The variable that stores the reference to another variable
    The variable that stores reference of garbage variable
    The variable that stores the memory address of another variable
    A & C Both

  1. In how many ways is polymorphism achived in C++?
    2
    3
    1
    4

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

Post Your Question
Social Sharing
Search