C++ | Constructors | Question 1
Which of the followings is/are automatically added to every class, if we do not write our own.
(A) Copy Constructor
(B) Assignment Operator
(C) A constructor without any parameter
(D) All of the above
Answer: (D)
|
|
chevron_right
filter_none
Explanation: In C++, if we do not write our own, then compiler automatically creates a default constructor, a copy constructor and a assignment operator for every class.
Recommended Posts:
- C++ | References | Question 1
- C++ | References | Question 6
- C++ | References | Question 6
- C++ | Constructors | Question 2
- C++ | Class and Object | Question 3
- C++ | Class and Object | Question 2
- C++ | Constructors | Question 3
- C++ | Constructors | Question 4
- C++ | Constructors | Question 5
- C++ | Misc C++ | Question 1
- C++ | Class and Object | Question 3
- C++ | Operator Overloading | Question 10
- C++ | Operator Overloading | Question 2
- C++ | References | Question 4
- C++ | References | Question 5


