Find jobs | Company-wise jobs
Jobseekers | Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Interview Q&A Tutorials Oracle Sql server .NET Java Soft skills CV GD Work from home Online practice test FAQs in PDF Books Jobs FAQs
Interview questions                  
C++ interview
C interview
C test!
C++ test!
Data structure test!
C++ access control
C++ COM
C++ constructors destructors
C++ containers
C++ DCOM
C++ derived class
C++ error handling
C++ exception handling
C++ friend members
C++ inheritance
C++ inline function
C++ memory leaks
C++ namespaces
C++ new and delete
C++ operator overloading
C++ pointers
C++ references
C++ static data
C++ syntax
C++ template
C++ type checking
C++ virtual functions
C++ pure virtual functions
C++ as an object-oriented
More concept of C++
C++ data types
C++ control constructs
C++ collections
C++ functions
C++ arrays
C++ C-string
C++ classes and structure
C++ Friend functions & classes
C++ polymorphism
C++ multiple inheritance
C++ function template
C++ class templates
C++ standard stream class
ATL server
Data structure in C++
 

C++ Constructors and destructors


C++ Constructors and destructors: Interview Questions

<<Previous  Next >> Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6

What is a constructor?

Latest answer: Constructors allow initialization of objects at the time of their creation. Constructor function is a special function that is a member of the class and has same name as that of the class. An object’s constructor..............
Read answer

What are destructors?

Latest answer: Destructors are complements of constructors. When an object is destroyed, its destructor is automatically called. Destructors are mainly useful for doing the clean up job. E.g. an object may have..............
Read answer

What are the restrictions apply to constructors and destructors?

Latest answer: The following restrictions apply to constructors and destructors

Constructors and destructors don't return values.
The addresses of constructors and destructors can't be taken so we can't use references and pointers on them...............
Read answer

Explain the order in which constructors are called when an object of a derived class is created.

Latest answer: The constructors of any virtual base classes are called first in the order of inheritance...............
Read answer

What is the difference between a copy constructor and an assignment operator?

Latest answer: A copy constructor is used to declare and initialize an object from another object. ..............
Read answer

What is a virtual destructor? Explain the use of it.

Latest answer: If the destructor in the base class is not made virtual, then an object that might have been declared of type base class and instance of child class would simply call the base class destructor without calling the derived class destructor...............
Read answer

How should a contructor handle a failure?

Latest answer: Constructors don't have a return type, so it's not possible to use return codes. The best way to signal..............
Read answer

What are shallow and deep copy?

Latest answer: A shallow copy just copies the values of the data as they are. Even if there is a pointer that points to dynamically allocated memory, the pointer in the copy will point to the same dynamically allocated..............
Read answer

What is virtual constructors/destructors?

Latest answer: The explicit destroying of object with the use of delete operator to a base class pointer to the object is performed by the destructor of the base-class is invoked on that object................
Read answer

<<Previous  Next>>
Also read
More about constructors and destructors

 
Want to be hunted by potential employers? Just submit your key skills!

Popular FAQs

.NET .Net Architecture ADO.NET Java Oracle C#.NET
VB.NET DOT.NET AJAX ASP.NET NET Framework OOPS in .NET
C++ Sql Server Data warehousing EJB MySQL Linux
PHP UML Networking Testing XML  
 
Copyright © 2008 - 2010 CareerRide.com. All rights reserved.