What is friend function?

Answer Posted / vigneswari

FRIEND FUNCTION IS USED TO ACCESS THE DATAMEMBERS,MEMBER
FUNCTION DECLARED UNDER PRIVATE(access
specifier)...normaly we canot access the members under
private for the whole program.......BUT USING THIS
FRIENDFUNCTION WE CAN ACCESS THE FUNCTION UNDER
PRIVATE................BEST WISHES TO B A GUD
PROGRAMMER...ALL THE BEST

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to improve object oriented design skills?

571


Why is destructor used?

587


i got a backdoor offer in process global,Bangalore..Can i work with it?

2330


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1411


Why is polymorphism needed?

605






when to use 'mutable' keyword and when to use 'const cast' in c++

1651


What is abstraction example?

624


What is oops with example?

566


If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?

944


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

1623


What is abstract class in oop?

537


What is encapsulation with real life example?

573


What is a class oop?

594


Why is oop better than procedural?

606


What is the difference between static polymorphism and dynamic polymorphism?

587