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

Constructors and Destructors (4)

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

__________ used to make a copy of one class object from another class object of the same class type.

A. constructor
B. copy constructor
C. destructor
D. default constructor

Answer: Option B

Explanation:

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

26. 

Which of   the following statement is correct?

A. Destructor destroys only integer data members of the object.
B. Destructor destroys only float data members of the object.
C. Destructor destroys only pointer data members of the object.
D. Destructor destroys the complete object.

Answer: Option D

Explanation:

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

27. 

Which of the following gets called when an object goes out of scope?

A. constructor
B. destructor
C. main
D. virtual function

Answer: Option B

Explanation:

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

28. 

A union that has no constructor can be initialized with another union of __________ type.

A. different
B. same
C. virtual
D. class

Answer: Option B

Explanation:

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

29. 

A function with the same name as the class, but preceded with a tilde character (~) is called __________ of that class.

A. constructor
B. destructor
C. function
D. object

Answer: Option B

Explanation:

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

30. 

Copy constructor must receive its arguments by __________ .

A. either pass-by-value or pass-by-reference
B. only pass-by-value
C. only pass-by-reference
D. only pass by address

Answer: Option C

Explanation:

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

31. 

When are the Global objects destroyed?

A. When the control comes out of the block in which they are being used.
B. When the program terminates.
C. When the control comes out of the function in which they are being used.
D. As soon as local objects die.

Answer: Option B

Explanation:

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

32. 

Which of the following statement is incorrect?

A. Constructor is a member function of the class.
B. The compiler always provides a zero argument constructor.
C. It is necessary that a constructor in a class should always be public.
D. Both B and C.

Answer: Option D

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
© 2026 IndiaBIX. All Rights Reserved.

Report