Answer the following questions true (T) or false (F)
1. A friend function has access only to the private members and member functions of the class (and all objects of that class) of which it is a friend.
2. A class can have friends that are functions as well as friend classes.
1. False
Explanation: A friend function, like every other function, has access to any public members of any class, the class of which it is a friend included. Friendship gives the function access to all public and private members.
2. True
Explanation: A friend function has access to all members of the class of which it is a friend. When a class A is a friend of class B, then every member of class A is a friend function of class B. This grants full access to class B’s members to all function members of class A.
You might also like to view...
Which of the following is NOT one of the default calculations displayed by AutoCalculate?
A) Count B) Sum C) Maximum D) Average
An Entity-Relationship Diagram (ERD) is a type of data model that graphically represents the data needs of an organization.
a. true b. false
After a schema is imported into another schema file, any _____ it contains with global scope can be referenced in that file.
A. objects B. variables C. content D. characters
The VLAN identification configuration option is valid on which of the following Hyper-V virtual networks?