what is costructor?



what is costructor?..

Answer / dipraj shahane

Constructor is special member function of class which having
same name as Class name and no return type. Main function of
Constructor is to initialize (give default values to member
variable of class object) object. Constructor gets invoke
when you create new object by following syntax.

ClassName objectName = new ClassName();

Is This Answer Correct ?    22 Yes 0 No

Post New Answer

More OOPS Interview Questions

In which cases you use override and new base?

2 Answers  


write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

0 Answers  


What is use of overloading?

0 Answers  


Is data hiding and abstraction same?

0 Answers  


Describe these concepts: Polymorphism, Inheritance and Abstraction.

0 Answers   TCS,






why we are declare the function in the abstract class even though we are declaring it in Derived class?

1 Answers   TCS,


When not to use object oriented programming?

0 Answers  


What is an interface in oop?

0 Answers  


what is the virtual function overhead, and what is it used for ? i hope i can get and appropriate answers, thanks a lot....

6 Answers  


What is the difference between an object and a class?

3 Answers  


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

0 Answers  


me get an assignent n its question is this 1.creat a set as in math i.ea={1,2} 2.insert element in it3. delete element don,t repeat any element 4.union 5. intersection of two sets plz help me i always pray for u n send me at ayeshawzd@hotmail.com f u have c++ how to program 5th addition then it is the 10.9 question in 10th chapter exercise

1 Answers  


Categories