Answered Questions

  • What is a constructor ?

    A constructor is a special member function which will construct an object with user defined values whenever object is created OR A constructor is a special member function which will be called automatically to initialize the data member of a class whenever object is instantiated.

    Sukhpal singh

    • Jan 29th, 2007

    HI The main purpose of constructor to initialize the fields of class . It call automatically ,when object of that class is created