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

What is the main purpose of inheritance law?

667


what are the ways in which a constructors can be called?

1581


What is overloading and its types?

615


What is overloading in oop?

575


What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?

2104






Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

697


hi all..i want to know oops concepts clearly can any1 explain??

1681


How Do you Code Composition and Aggregation in C++ ?

24196


What type of loop is a for loop?

682


What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

1652


What is polymorphism and example?

592


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2006


What is polymorphism oop?

621


What are functions in oop?

582


Is react oop?

609