C++ Language Multiple Choice Questions and Answers - 1
Question: 1
When a class object goes out of scope, the function that gets executed is ____
(A) Constructor
(B) Destructor
(C) Friend
(D) Inline
Ans: B
Destructor
Question: 2
Which is executed automatically when the control reaches the end of the class scope?
(A) Constructor
(B) Destructor
(C) Overloading
(D) Copy constructor
Ans: B
Destructor
Question: 3
The special character related to destructor is ___
(A) +
(B) !
(C) ?
(D) ~
Ans: D
~
Question: 4
The constructor without any parameter is called as ___
(A) Initial constructor
(B) Parameterized constructor
(C) Default constructor
(D) Instance parameter
Ans: B
Parameterized constructor
Question: 5
The constructor defined by the computers in the absence of user defined constructor is ____
(A) Copy
(B) Abstract
(C) Default
(D) Destructor
Ans: C
Default
Signals and Systems Quiz Questions and Answers Pdf More
Signals and Systems MCQ Questions and Answers Pdf More
Electrical Power Sources Quiz Questions & Answers Pdf More
Electromagnetic Field Theory Question Bank 2024-2025 More
Power Semiconductor Device and Integrated Circuits Questions More
1000+ Quantitative Aptitude Questions & Answers for Competitive Exams More
1000+ Microcontroller MCQ Questions and Answers Pdf More
TNPSC Group 1, 2, 2a, 4, VAO History Study Materials in Tamil & English Pdf More
7000+ Gk Questions asked in IBPS RRB PO Mains 2023 - 2024 Pdf More
100+ Time and Work Questions for Competitive Exams More