Answer Posted / mital
A friend function is used in object-oriented programming to
allow access to private or protected data in a class from
outside the class. Normally a function which is not a
member of a class cannot access such information; neither
can an external class. Occasionally such access will be
advantageous for the programmer; under these circumstances,
the function or external class can be declared as a friend
of the class using the friend keyword. The function or
external class will then have access to all information –
public, private, or protected – within the class.
Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Can an interface inherit a class?
What are the 4 pillars of oop?
What is destructor give example?
What is the point of oop?
What is abstraction and encapsulation?
What is the real life example of polymorphism?
What are constructors in oop?
Is enum a class?
Can a varargs method be overloaded?
When not to use object oriented programming?
What is inheritance in oop?
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
What is abstraction in oops with example?
What makes a language oop?
What is meant by multiple inheritance?