5 years ago in C++ Functions

A friend function can be used to ?

[A] avoid arguments between classes
[B] allow access to classes whose source code is unavailable
[C] allow one class to access an unrelated class
[D] increase the versatility of an overloaded operator
Loading...
Next Question

Overall Stats

Attempted 130
Correct 25
Incorrect 34
Viewed 71

Answers

Guest
Guest
Tooba Mustafa
Tooba Mustafa - 1 month ago

Tooba Mustafa is saying allow access to classes whose source code is unavailable is correct answer

ANSH
ANSH - 2 months ago

ANSH is saying allow one class to access an unrelated class is correct answer

Mohamed Ibrahim
Mohamed Ibrahim - 4 months ago

Mohamed Ibrahim from Palestine is saying allow one class to access an unrelated class is correct answer

indhuja indhuja
indhuja indhuja - 4 months ago

indhuja indhuja from Erode, India is saying increase the versatility of an overloaded operator is correct answer

Sarita Nauriya
Sarita Nauriya - 5 months ago

Sarita Nauriya from Hyderabad, India is saying allow one class to access an unrelated class is correct answer

Related Questions

A static function

  • [A] should be called when an object is destroyed
  • [B] is closely connected with an individual object of a class
  • [C] can be called using the class name and function
  • [D] is used when a dummy object must be created

What is true about inline functions ?

  • [A] It's a compulsion on the compiler to make function inline
  • [B] It's a request to the compiler to make te function inline
  • [C] It's the indication to the compiler that the function is recursive
  • [D] It's the indication to the compiler that the function is member function

Which of the following statement is correct?

  • [A] Constructors can have default parameters.
  • [B] Constructors cannot have default parameters.
  • [C] Constructors cannot have more than one default parameter.
  • [D] Constructors can have at most five default parameters.

Which of the following statement is incorrect?

  • [A] Default arguments can be provided for pointers to functions.
  • [B] A function can have all its arguments as default.
  • [C] Default argument cannot be provided for pointers to functions.
  • [D] A default argument cannot be redefined in later declaration.

Which of the following function declaration is/are incorrect?

  • [A] int Sum(int a, int b = 2, int c = 3);
  • [B] int Sum(int a = 5, int b);
  • [C] int Sum(int a = 0, int b, int c = 3);
  • [D] Both B and C are incorrect.
  • [E] All are correct.