100+ MCQ on Constructor and Destructor in C++ - 2
Question: 6
A destructor name must be
(A) same as class name prefixed by tilde (~) character
(B) same as class name
(C) same as any other member function name
(D) none of the given
Ans: A
same as class name prefixed by tilde (~) character
Question: 7
Which of the following prototype can be a copy constructor of class myclass?
(A) myclass (myclass & ×)
(B) myclass copy (myclass a)
(C) int copy (myclass mc)
(D) myclass (int myclass)
Ans: A
myclass (myclass & ×)
Question: 8
A copy constructor is invoked when
(A) an object is passed by reference to constructor
(B) a member function returns an object
(C) an object is passed as a parameter to any of the member function
(D) all of the above
Ans: D
all of the above
Related Questions
Recent Articles
Dc generator questions and answers pdf More
DC Generator Questions and Answers Pdf More
Electromagnetic Induction Quiz Questions and Answers More
Basic Electronics Quiz Questions with Answers Pdf More
Wireless Communication MCQ Questions with Answers More
Digital Communication Quiz Questions and Answers Pdf More
April-18-2024
| Meritnotes
DC Generator Questions and Answers Pdf More
April-18-2024
| Meritnotes
Electromagnetic Induction Quiz Questions and Answers More
April-17-2024
| Meritnotes
Basic Electronics Quiz Questions with Answers Pdf More
April-16-2024
| Meritnotes
Wireless Communication MCQ Questions with Answers More
April-15-2024
| Meritnotes
Digital Communication Quiz Questions and Answers Pdf More
April-14-2024
| Meritnotes
Trending Posts
Top 10,000+ Computer Fundamentals Quiz Questions and Answers More
100+ Antonyms Questions and Answers for SSC Exam More
1000+ Mental Ability Questions with Answers Pdf More
1000+ Reservoir Engineering Interview Questions and Answers More
TNPSC Group 1, 2, 4 Previous Year Question Papers with Answers More
1000+ Commercial Bank of Ethiopia Exam Question and Answer Pdf More
April-22-2021
| Meritnotes
100+ Antonyms Questions and Answers for SSC Exam More
February-24-2020
| Meritnotes
1000+ Mental Ability Questions with Answers Pdf More
May-30-2020
| Meritnotes
1000+ Reservoir Engineering Interview Questions and Answers More
June-07-2022
| Meritnotes
TNPSC Group 1, 2, 4 Previous Year Question Papers with Answers More
April-19-2020
| Meritnotes
1000+ Commercial Bank of Ethiopia Exam Question and Answer Pdf More
December-08-2022
| Meritnotes