Ask a Question

What are default and copy constructor?


Arpan

on 2010-09-29 09:30:00  

copy constructor related to c++.You are passing object reference as argument of the constructor. So that u initialize another object from another.

anuradha

on 2010-10-01 09:30:00  

default constructor -is that constructor which is implicitly sitted by the compiler during runtime.like if in program u dnt have any constructor den compiler will implicitly sit a default constructot(having name as dat of the class ,no return type and no parameters)and this constructor will intialize the variables of the class by default to 0.

anuradha

on 2010-10-01 09:30:00  

copy constructor-the variables of the class are initialized by passing a object as reference.