Which of the following functions should be the destructor function for user…

2022

Which of the following functions should be the destructor function for user defined class Person in C++?

Answer: D. ~Person()

  1. A.

    Person(string s)

  2. B.

    Person()

  3. C.

    ~Person(string s)

  4. D.

    ~Person()

Attempted by 568 students.

Show answer & explanation

Correct answer: D

Explore the full course: Rssb Senior Computer Instructor

Loading lesson…