aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Object Oriented Programming Fundamentals
  • To expose a data member to the program, it must be declar...
Multiple choice

To expose a data member to the program, it must be declared in which section of the class?

  1. Common

  2. Protected

  3. Public

  4. User

  5. Private

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

A member (either data member or member function) declared in a public section of a class can be accessed by anyone.

Keep practicing — related questions

  • The default access level assigned to members of a class is ___________
  • The members (variables and methods) of a class are by default specified as _________
  • We would like to make a member of a class visible in all subclasses regardless of what package they are in....
  • The protected data members of a base class become ___________ when privately derivated in the derived class.
  • You want a class to have access to members of another class in the same package. Which is the most restrict...
  • You want a class to have access to members of another class in the same package. Which is the most restrict...
  • What is the default access specifier for a Top-level Class, which are not nested into other Classes?
  • You want a class to have access to members of another class in the same package. Which is the most restrict...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Object-Oriented Programming (2239 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy