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
Kubernetes MCQ Quiz for Beginners and Professionals 2026-2027 More
Multiple Choice Questions on Basic Programming Language More
Information Security Quiz Questions and Answers Pdf More
DevOps Multiple Choice Questions and Answers More
Advanced SEO Interview Questions and Answers Pdf More
100+ Aptitude Questions for Placements with Solutions Pdf More
Microsoft Word Multiple Choice Questions and Answers More
Polyphase Induction Motor Objective Questions & Answers More
Free Computer Mock Test for Competitive Exams More
Atomic Structure Multiple Choice Questions and Answers More