Write the general syntax of a class that has one function as a-02405

Online Quiz This subjective question is related to the book/course vu mth718 Topics in Numerical Methods. It can also be found in vu mth718 Mid Term Solved Past Paper No. 12.

Question 1: Write the general syntax of a class that has one function as a friend of a class along with definition of friend function.
Answer:
class frinedclass{
public:
friend int compute(exforsys e1)
};
Int compute(exforsys e1){
//Friend Function Definition which has access to private data
return int(e1.a+e2.b)-5;
}

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background