When copy constructor can be used?

Answer Posted / priya

Whenever u want to copy the members of one object to another
object of the same class in a C++ program.

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.

2261


What is the difference between map and hashmap in c++?

760


How do you find out if a linked-list has an end?

834


What are destructors?

733


Is c++ the hardest language?

723






What is a node class in c++?

806


Which bit wise operator is suitable for turning off a particular bit in a number?

836


What is static class data?

753


Show the declaration for a static function pointer.

772


Who was the creator of c++?

751


Difference between pointer to constant vs. Pointer constant

793


Can char be a number c++?

772


Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).

833


List the types of polymorphism in c++?

824


What is the advantage of an external iterator.

740