In C++, a function contained within a class is called

[amp_mcq option1=”a member function” option2=”an operator” option3=”a class function” option4=”a method” correct=”option1″]

The correct answer is A. A member function is a function that is contained within a class. It can access the private and protected members of the class.

B. An operator is a special symbol that performs an operation on operands. For example, the + operator adds two operands together.

C. A class function is a function that is not contained within a class. It cannot access the private and protected members of the class.

D. A method is a synonym for a member function.