Question 90Asked in DSSSB PGT Computer Science (Technical), 11 Jul 2021

By default in C++, the member of a class are ________, while, by default the member of structure are ________.

  1. APrivate; private
  2. BPublic; public
  3. CPrivate; public
  4. DPublic; private
Show answerHide answer

Correct answer: (C) Private; public

Explanation

In C++, class members are private by default, while struct members are public by default.

From DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021

This is question 90 of DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021. 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.