The is called whenever a class object is no longer in use It

The is called whenever a class object is no longer in use. It is used for garbage collection. a) cleaner b) destructor c) copy constructor d) assignment operator 01 class A {02 string x; 03}; For the above class, which of the following is a general set accessor method declaration for its field. a) void getX(); b) string setX(); c) void setX(string); d) string getX(); Fields and methods of a class with visibility are only accessible by the class, derived classes and friends. a) public b) internal c) private d) protected Which of the following is the correct way to define a static const floating point field named str a) static const string str; b) static constant double str = 3.14; c) static const double str = 3.14; d) static const string str = \"hello\";

Solution

Question 1:

Answer: A) Cleaner

Question 2:

Answer: c) void setX(string);

Question 3:

Answer:c) Private

Question 4:

Answer:c) static const double st = 3.14;

 The is called whenever a class object is no longer in use. It is used for garbage collection. a) cleaner b) destructor c) copy constructor d) assignment operat

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site