Answer Posted / praveen
A copy constructor is used in the following cases.
* When compiler generates a temporary object.
* When an object is return type of pointer.
* This is a temporary object.
Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
Can constructor be private in c++?
What do you mean by translation unit?
Evaluate !(1&&1||1&&0) a) Error b) False c) True
List the types of polymorphism in c++?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
What is a hashmap c++?
Name the operators that cannot be overloaded in C++?
How do you master coding?
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
Define pre-condition and post-condition to a member function in c++?
Which c++ operator cannot overload?
Explain the static storage classes in c++.
Explain differences between new() and delete()?
What are single and multiple inheritances in c++?
find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.