IndiaBIX
IndiaBIX
Start typing & press "Enter" or "ESC" to close
  • Home
  • Jobs
  • Results
  • Current Affairs
  • GK
  • Online Test
  • HR Interview
  • BLOG

Constructors and Destructors (5)

  • Home
  • Computer Science & Engineering
  • C++ Programming Questions and Answers
  • Constructors and Destructors
33. 

Which of the following statement is correct?

A. Constructor has the same name as that of the class.
B. Destructor has the same name as that of the class with a tilde symbol at the beginning.
C. Both A and B.
D. Destructor has the same name as the first member function of the class.

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.
View Answer Discuss Workspace Report

34. 

Which constructor function is designed to copy objects of the same class type?

A. Create constructor
B. Object constructor
C. Dynamic constructor
D. Copy constructor

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.
View Answer Discuss Workspace Report

35. 

For automatic objects, constructors and destructors are called each time the objects

A. enter and leave scope
B. inherit parent class
C. are constructed
D. are destroyed

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.
View Answer Discuss Workspace Report

36. 

Destructor has the same name as the constructor and it is preceded by ______ .

A. !
B. ?
C. ~
D. $

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.
View Answer Discuss Workspace Report

37. 

Can a class have virtual destructor?

A. Yes
B. No

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.
View Answer Discuss Workspace Report

38. 

What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor?

A. Compile-time error.
B. Preprocessing error.
C. Runtime error.
D. Runtime exception.

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.
View Answer Discuss Workspace Report

39. 

A constructor that accepts __________ parameters is called the default constructor.

A. one
B. two
C. no
D. three

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.
View Answer Discuss Workspace Report

  • 1
  • 2
  • 3
  • 4
  • 5

Questions & Answers

Aptitude Chemical Engineering Civil Engineering Computer Science & Engineering Current Affairs Data Interpretation Electrical & Electronics Engineering Electronics & Communication Engineering General Knowledge Logical Reasoning Mechanical Engineering Non Verbal Reasoning Verbal Ability Verbal Reasoning

Interviews

HR Interview

Jobs

Sarkari Jobs

Results

Rojgar ResultSarkari Result

Admission

Admission 2023

Admit Card

Admit Card 2023

Answer Key

Answer Key 2023
copyright
Privacy Policy
© 2025 IndiaBIX. All Rights Reserved.

Report