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

What is buffer and example?

517


What is the output of the following program? Why?

614


What are shallow and deep copies?

627


What does int * mean in c++?

625


How do you remove an element from a set in c++?

568






What are smart pointers?

665


Which software is best for programming?

652


What is a virtual destructor? Explain the use of it?

539


What are libraries in c++?

599


What does getch() do according to the ANSI C++ standard a) Reads in a character b) Checks the keyboard buffer c) Nothing in particular (Its not defined there)

594


What relational operators if statements in c++?

632


What are the two types of comments?

566


Evaluate !(1&&1||1&&0) a) Error b) False c) True

692


What are the defining traits of an object-oriented language?

680


How do I download c++?

561