1. Home
  2. Computer Science MCQs
  3. C++ and Object-Oriented Programming
  4. The destructor of a class named Account is written as:

Added 30 Nov -0001

The destructor of a class named Account is written as:

  1. delete Account()
  2. destructor Account()
  3. ~Account() Correct answer
  4. Account~()

Correct answer

C. ~Account()

14 views

MCQSEXAM

Explanation

A destructor is declared with a tilde before the class name: ~Account().

Reference

Asked in: NTS, PPSC IT, Campus Interviews

Preparing for an exam?

Doubts & discussion

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

Ask a doubt about this MCQ

Shown after review. No links please.

More C++ and Object-Oriented Programming MCQs

Practise all C++ and Object-Oriented Programming MCQs

Similar MCQs