Explain the following programming terms:
i. Friend function
ii. Inline functions
Answer:
i. Friend function
- A function that is used to access non-public members
- A function from the same or other class that can access the private and protected sections of the class
- Friend functions are preceded by the keyword friend
ii. Inline functions
- Functions that are expanded in the line to improve on the execution efficiency
-Functions that are preceded by the keyword inline, small in size