Multiple choice

A function contained within a class is called

  1. a class

  2. an operator

  3. a data item

  4. a member function

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

A function defined inside a class is referred to as a member function. It has access to the private and protected members of the class.