Advantages and Disadvantages of Friend Function in C++We have created the friend function to access the different modifiers in C++ Object Oriented Programming System such as Protected, Private and Public. The friend function or the friend class will usually be defined outside the course but still has access to the class's private, protected and public members defined in the class code.
C++ code Output: /tmp /mB gjSey FC Z.o 3135 C++ code Output: /tmp /mB gjSey FC Z.o After performing the operations, the value for X we have got is 3979 C++ code Output: /tmp /mB gjSey FC Z.o Dear User, please enter the value for the variable first no: 35 Dear User, please enter the value for the variable second no: 365 Hey! User, the maximum number among the inputs entered by you is: 365 Next TopicC++ Pre-processors |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India