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

why overriding?

3 Answers  


What is encapsulation in oop?

0 Answers  


what is Class in oops with example?

4 Answers   HCL,


Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

0 Answers  


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

0 Answers   HCL,






What is virtual Function.

1 Answers   Wipro,


In multilevel inheritance constructors will be executed from the .... class to ... class

2 Answers   ABCO, TCS,


What do you mean by abstraction?

0 Answers  


How is polymorphism achieved?

0 Answers  


What is the use of fflush(stdin) in c++?

4 Answers   HCL,


can inline function declare in private part of class?

1 Answers  


Example for 4 pillar of oops like, Inheritance,Poly,Abstraction,Encabsulation ?

3 Answers  


Categories