What is the Diffrence between a "assignment operator" and a
"copy constructor"?
Answer Posted / dee
assignment operator copies the values of one object to
another of the same class.It will excute only when the
right side of the variable is object and two sides are not
equal.It does shallow copy
Copy constructor craetes the object if its not existing and
copies the values of another object of the same class and
it does the deep copy.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?
What is meant by forward referencing and when should it be used?
Is c++ a dying language?
How can a called function determine the number of arguments that have been passed to it?
True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends
Why do we use templates?
How to allocate memory dynamically for a reference?
What does n mean in c++?
What are the two types of polymorphism?
Describe Trees using C++ with an example.
how to explain our contribution in the project?
What is split a string in c++?
Can we sort map in c++?
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300
What is data hiding c++?