5 years ago in C++ Functions

A friend function

[A] is declared as a friend & defined elsewhere in the program
[B] is always an inline function
[C] created objects without initialization
[D] May be a static member function of the class
Loading...
Next Question

Overall Stats

Attempted 120
Correct 37
Incorrect 16
Viewed 67

Answers

Guest
Guest
Tooba Mustafa
Tooba Mustafa - 1 month ago

Tooba Mustafa is saying May be a static member function of the class is correct answer

Diksha Nasa
Diksha Nasa - 1 month ago

Diksha Nasa is saying created objects without initialization is correct answer

indhuja indhuja
indhuja indhuja - 4 months ago

indhuja indhuja from Erode, India is saying is always an inline function is correct answer

Lakmee Lakshana Hewapathirana
Lakmee Lakshana Hewapathirana - 4 months ago

Lakmee Lakshana Hewapathirana from Nittambuwa, Sri Lanka is saying May be a static member function of the class is correct answer

Sarita Nauriya
Sarita Nauriya - 5 months ago

Sarita Nauriya from Hyderabad, India is saying is declared as a friend & defined elsewhere in the program is correct answer

Related Questions

Which of the following function / type of function cannot be overloaded?

  • [A] Member function
  • [B] Static function
  • [C] Virtual function
  • [D] Both B and C

Which of the following statement will be correct if the function has three arguments passed to it?

  • [A] The trailing argument will be the default argument.
  • [B] The first argument will be the default argument.
  • [C] The middle argument will be the default argument.
  • [D] All the argument will be the default argument.

Which of the following parameter passing mechanism is/are supported by C++ but not in C?

  • [A] Pass by value
  • [B] Pass by reference
  • [C] Pass by value result
  • [D] All of the above

When an argument is passed by reference

  • [A] a variable is created in function to hold the argument value
  • [B] the function cannot access the argument value
  • [C] a temporary variable is created in the calling program to hold arguments value
  • [D] None of these

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