![]() |
| 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 |
![]() Related Questions A scope resolution operator (::), can be used to define the member functions of a class outside the class. Latest Answer : Scope resolution:As the name itself indicates,it resolves global scope to local scopeEx:int a=10;int main(){a=20;cout Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching Latest Answer : Virtual constructor is not build-in C++ feature but it doesn't mean its not used by devs in code and in conversations. There are many other things that doesn't exist in particular language yet, people find ways around to solve it (SingleTon, Virtual Constructor, ... Latest Answer : A constructor of a class is mainly responsibly for turning the raw memory allotted to an object into a usable object. DEFAULT CONSTRUCTOR:The default constructor is a constructor that takes no argument. Part::Part()String() and String(const char* str) ... Latest Answer : Inspite of repeated requests by some (few) sensible people to everybody to read the question properly before responding, nobody listens.For doreen, the question does not ask you to explain deep copy and shallow copy mechanism neither does is asks how ... No Latest Answer : yes in c++ a class can have a default constructor.a default constructor is a constructor which doesn't pass any arguements to it. ... Read Answers (6) | Asked by : Nisar.E Latest Answer : Its just by using new and delete operators which will allocate at runtime as in C++In C,v hav to use malloc,free operators . ... Latest Answer : A copy constructor is used to initialize a newly declared variable from an existing variableA variable is declared which is initialized from another object,A value parameter is initialized from its corresponding argument.f(p); // copy constructor ... Latest Answer : Constructor is called when an object is created.Copy constructor is called when the copy of an object is made. For e.g. passing parameter to function by value, function returning by value. Copy constructor takes the parameter as const reference to the ... Latest Answer : Thank you everybody for giving the right answer to the question. However the use of the term "pointer" in the question still leaves a lingering doubt in my mind as to whether the questioner really typoed a reference as a pointer? or did ... Tags : Pointer What happens to the member pointers when an exception occures in constructor, while allocating memory ? how can we over come this ? Read Answers (2) | Asked by : Shyam
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||