OOPortal
OOPortal
SiteMap
Reusable Software
Structured Programming
Operator Overloading
«Prev
Reusable Code
Polymorphism Concept
Comparing Conversion Operators
ADT Conversion
Conversion Member Functions
Signature Matching Algorithm
Operator Overloading
Unary Binary Overloading
friend Function Usage
friend Function - Quiz
Overloading Operators
Pure Polymorphism
public Inheritance - Quiz
Virtual Function - Exercise
Pure Polymorphism
Ecological Simulation
Friend functions in C++ - Quiz
Each question is worth one point. Select the best answer or answers for each question.
1.
A friend function declaration:
A.
gives nonmember functions access to hidden class members
B.
is another term for an overloaded function within a class
C.
is any function created for you by the compiler (such as a default constructor)
D.
is any function outside the class with the same name as a function in the class
2.
A
friend
function declaration appears:
A.
in the header of the
friend
function outside the class
B.
inside the class declaration to which it is a
friend
C.
as a separate declaration inside
main()
D.
anywhere prior to the function invocation
Score =
Correct answers:
Quiz Explanation