C++
Programming and Technical
Programming
Technical
Which of the following statements is incorrect?
A. Friend keyword can be used in the class to allow access to another class.
B. Friend keyword can be used for a function in the public section of a class.
C. Friend keyword can be used for a function in the private section of a class.
D. Friend keyword can be used on main().
Read Solution (Total 4)
-
- C.friend access the private data, and supose we declare private not access for other class so.
- 9 years agoHelpfull: Yes(2) No(0)
- A
friend keyword is used to access from one class to another clsss - 8 years agoHelpfull: Yes(0) No(0)
- Ans is a because
A friend function of a class is defined outside that class' scope but it has the right to access all private and protected members of the class. Even though the prototypes for friend functions appear in the class definition, friends are not member functions
- 8 years agoHelpfull: Yes(0) No(0)
- yes friend keyword is declare of private part not use to another class
- 7 years agoHelpfull: Yes(0) No(0)
C++ Other Question