Friend function is used to access the private data members of a class. The syntax of implementing friend function is :
Friend data type show (class name);
Ex: friend void show(sample);
The above mentioned program explains just to assign the value...See more
s to the variables and how can a friend function access those data members.
Answer the Question