UNIT3

C++ FUNCTIONS









6. Program for Calculate CPI of Last two sem from SPI using Friend function for two Classes.

7. What is friend function? Give an example. What is the advantage of Overloading binary operator as friend function?




11. Explain Friend function and its characteristics. Define a class matrix with an integer array of 3X3 as a data member. Define a friend function which adds two matrix objects and returns resultant matrix object.

12. Write a complete program to illustrate the use of this pointer.

No comments:

Post a Comment