if u write a class do u write Assignment operator and copy
constructor



if u write a class do u write Assignment operator and copy constructor..

Answer / sachin

Compiler provide the assignment operator/ copy constructor
by default. The assignment operator and copy constructor do
the bit wise copy of the object. If user want to do the
member wise copy(ex:allocating the memory from the heap)
for the members, one can write his/her own assignment
operator/ copy constructor.

Is This Answer Correct ?    11 Yes 0 No

Post New Answer

More OOPS Interview Questions

In the following declaration of main, "int main(int argc, char *argv[])", to what does argv[0] usually correspond? 1) The first argument passed into the program 2) The program name 3) You can't define main like that

6 Answers  


Write a c++ program to display pass and fail for three student using static member function

0 Answers  


What are classes 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  


explain dynamic binding by drowing

2 Answers   Cognizant,






3. Differentiate verification and validation.

1 Answers  


What is the correct syntax for inheritance? 1) class aclass : public superclass 2) class aclass inherit superclass 3) class aclass <-superclass

6 Answers   Wipro,


Describe the difference between a Thread and a Process?

11 Answers   Siebel Systems,


what are the ways in which a constructors can be called?

2 Answers   TCS,


Program to read a comment string

1 Answers   IBM,


What are the data types in oop?

0 Answers  


what is the difference b/w abstract and interface?

2 Answers   Merrill Lynch, Schneider, Scio Healthcare,


Categories