OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024

OOPS

Question 201
A copy constructor is invoked when :
A
a function returns by value
B
an argument is passed by value
C
a function returns by reference
D
none of the above
Question 201 Explanation: 
A copy constructor is a special constructor for creating a new object as a copy of an existing object.
Features:
1. Initialize one object from another of the same type.
2. Copy an object to pass it as an argument to a function.
3. Copy an object to return it from a function.
Correct Answer: B
Question 201 Explanation: 
A copy constructor is a special constructor for creating a new object as a copy of an existing object.
Features:
1. Initialize one object from another of the same type.
2. Copy an object to pass it as an argument to a function.
3. Copy an object to return it from a function.

Leave a Reply

Your email address will not be published. Required fields are marked *