GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Programming  >  C++

 Print  |  
Question:  what is defference between constructor and destructor




August 08, 2008 06:33:10 #6
 vsvraju   Member Since: August 2008    Total Comments: 5 

RE: what is defference between constructor and destructor
 
Constructor builds the object from the scratch, where as destrcutor give the object its last rights (like, for getting back the allocated memory). Constructor gets called when the object was created and destructor gets called automatically when the object goes out of scope.
     

 

Back To Question