218k views
2 votes
Which of the following statements is/are true? (Points : 5) A. A default constructor is automatically created for you if you do not define one.

B. A static method of a class can access non-static members of the class directly.
C. An important consideration when designing a class is identifying the audience, or users, of the class.
None of the above
Only A and C

User TimS
by
8.1k points

1 Answer

1 vote

Answer: Only A and C

Explanation: Default constructor is a constructor that has parameters with the values that are default or has no arguments/parameter present. Default constructor is not declared in the class rather it gets generated by itself when not defined.

Class is defined with data members, functions, objects etc are considered as per the requirement given by the user .It is the user defined concept.

Statement (B) is incorrect because static method is used for accessing the static members of the particular class and manipulate the value of it.

Thus, only statement (A) and (C) are correct.

User Berky
by
7.5k points