Question 98Asked in BPSC TRE 2.0 (2023) Computer Science Class 11-12

In C++, all members of a class are _____ by default.

  1. Apublic
  2. Bprivate
  3. Cprotected
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (B) private

Explanation

In C++, members of a class are private by default unless an access specifier says otherwise.

From BPSC TRE 2.0 (2023) Computer Science Class 11-12 — Previous Year Paper

This is question 98 of BPSC TRE 2.0 (2023) Computer Science Class 11-12 — Previous Year Paper. 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.