hamburger

Which of the following is not the member of class?

By BYJU'S Exam Prep

Updated on: September 25th, 2023

Which of the following is not the member of class?

  1. Static function
  2. Const function
  3. Friend function
  4. Virtual function

Answer: Option C. Friend function

Friend function is not the member of class.

Solution

In C, a function with a scope restricted to its object file is known as a static function. The static function is thus only accessible through its object file. By adding the static keyword before the function name, a function can be declared as static.

The function declared in the program as constants are the const member functions. These functions cannot alter the object they call. Use of the const keyword is advised to prevent unintentional changes to objects. Any kind of object can call a const member function.

The friend function is not the member of class. Despite not being actual members of the class, they are given the same access permissions as the member function.

☛ Related Questions:

Our Apps Playstore
POPULAR EXAMS
SSC and Bank
Other Exams
GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303 help@byjusexamprep.com
Home Practice Test Series Premium