Friend function MCQs – C++

By: Prof. Dr. Fazal Rehman | Last updated: May 2, 2025

9
Score: 0
Attempted: 0/9
Subscribe
1. We can define a binary operator as:



2. Correct example of a binary operator is _______.



3. ____ is a correct example of a unary operator.



4. When we use an operator on user-defined class objects, operator overloading:



5. Ternary operator is shown as _____.



6. Overloading the addition (+) operator is correct function name OF:



7. ________ operators cannot be overloaded?


8. Choose the correct statement which is false about the operator:



9. To implicitly overload the += operator:



 

friend function declaration and definition
friend function declaration and definition

 

C++ example with a program with friend function
C++ example with a program with friend function

 

Example of Friend function Can access private and protected data members in C++
Example of Friend function Can access private and protected data members in C++

Friend Class in CPP

 

Friend functionality is not restricted to only one class
Friend functionality is not restricted to only one class

 

friend function cannot be invoked using the object as it is not in the scope of that class
friend functions cannot be invoked using the object as it is not in the scope of that class

 

Example of Friend functions having objects as arguments
Example of Friend functions having objects as arguments

OOP MCQs 

Programming C Plus Plus MCQs Homepage

shamil memory table

All Copyrights Reserved 2025 Reserved by T4Tutorials