This is a sample C++ program on Constructor Overloading. Using Constructor Overloading, here we calculate area of rectangles with default values. #include <iostream.h> #include <conio.h> class rectangle { private: int length, breadth; public: rectangle ( ) { length = breadth = 0; cout<<" Constructor With Zero Parameter Called .\n"; } rectangle (int a) { length = breadth = a; cout<<" Constructor With One Parameter Called. \n"; } rectangle (int a, int b) { le...
All HR and Technical interview questions with answers for freshers and experienced professional. It helps job seekers who are about to attend interviews.