Question 135

In C++, what is the default access specifier for members of a class?

  1. Aprivate
  2. Bfriend
  3. Cprotected
  4. Dpublic
Show answerHide answer

Correct answer: (A) private

Explanation

class members are private by default; struct members are public.

From DSSSB TGT Computer Science Full Mock Test 1

This is question 135 of DSSSB TGT Computer Science Full Mock Test 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.