No products in the cart.

What is accessor functions?

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

What is accessor functions?
  • 1 answers

Sia ? 5 years ago

They are used instead of making a class member variable public and changing it directly within an object. To access a private object member, an accessor function must be called. Typically for a member such as Level, a function GetLevel() returns the value of Level and SetLevel() to assign it a value.

http://mycbseguide.com/examin8/

Related Questions

What are called tokens
  • 2 answers
What is mean by buffering in file handling?
  • 1 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App