Answered Questions

  • what is defference between constructor and destructor

  • What is the difference between an object and a class?

     Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.  �      A Class is static. All of the attributes of a class are fixed before, during, and after the execution of a program. The attributes of a class don't change. �       The class to which an...

    Minh Nguyen

    • Jun 27th, 2016

    A class is an user-defined data structure and an object is an instance of that class.

    Jumana iqbal

    • Apr 24th, 2016

    Class is a user degined data type, the variables of class known as object, which are the central focus of object oriented programming

  • What is polymorphism? Explain with an example?  

    "Poly" means "many" and "morph" means "form". Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms of object. Example: function overloading, function overriding, virtual functions. Another example can be a plus �+� sign, used for adding two integers or for using it to concatenate two strings.  

    Tech4 u

    • Jul 22nd, 2017

    The ability to define more than one function with the same name is called polymorphism.

    This provides the facility of sending the same message to objects of parent class and objects of the sub classes.

    sunil

    • Feb 26th, 2017

    Several forms having same name is called polymorphism.
    We have two types of polymorphism in C++.
    1) Compile time Polymorphism or function overloading
    2) Runtime Polymorphism or function overriding