Online Test for C++

  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. What is a size of empty class in c++?
    4 bytes
    2 bytes
    0 bytes
    1 bytes


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

  1. Which of the following is user defined data type?
    Public
    Private
    Class
    A & B Both

  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. ________ is a default access specifier for members of class in C++.
    protected
    public
    private
    default


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

  1. Which of the following is not a member of class?
    Static function
    Friend function
    Const function
    Virtual function

  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. Member of a class specified as _______ are accessible only to method of the class.
    private
    public
    protected
    derive

Post Your Question
Social Sharing
Search