1. Home
  2. Engineering
  3. Computer Engineering
  4. Which statement is correct? A constructor

Added 28 Nov 2026

Which statement is correct? A constructor

  1. Contains declarations of functions and macros
  2. Means bundling data and methods together and restricting direct access to the data
  3. Makes a program run but produce incorrect output
  4. Is a special method called when an object is created Correct answer

Correct answer

D. Is a special method called when an object is created

MCQSEXAM

Explanation

A constructor is a special method called when an object is created.

Reference

Asked in: Engineering Computer Engineering Practice

https://en.wikipedia.org/wiki/Object-oriented_programming

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Computer Engineering MCQs

Practise all Computer Engineering MCQs

Similar MCQs