State the correct syntax of a friend function

89. State the correct syntax of a friend function.

  1. Class ABC{
    *****
    Friend public:
    *****
    Void xyz(); }
  2. Class ABC{
    *****
    public:
    *****
    Friend Void xyz(); }
    
  3. Class ABC{
    *****
    Friend public:
    *****
    Friend Void xyz(); }
    
  4. Class ABC{
    *****
    public::friend()
    *****
    Friend Void xyz(); }
    

Answer: B)

Class ABC{
*****
public:
*****
Friend Void xyz(); }

Explanation:

The correct syntax of a friend function:

Class ABC{
*****
 public:
*****
Friend Void xyz(); }

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.