aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C++ Object Oriented Programming
  • In which section of the program will you declare a friend...
Multiple choice

In which section of the program will you declare a friend function for the class?

  1. Private

  2. Public

  3. Outside class definition with keyword friend

  4. Inside class definition

  5. None of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The friend function is always declared outside any class by using friend keyword.

Keep practicing — related questions

  • Identify the correct function declaration.
  • Directions: Choose the correct pair of words to fill the blanks in the given sentence. I do not socialize w...
  • A friend in ( ) is a friend indeed.
  • If FRIEND is coded as HUMJTK, then how is CANDLE written in that code?
  • The average marks of 22 students in section A of class 9 are 52, that of 23 students of section B are 50 an...
  • What will be the output of the program? public class HorseTest { public static void main (String [] args) {...
  • What will be the output of the program? public class A { void A() /* Line 3 */ { System.out.println("Class ...
  • What will be the output of the program? class Two { byte x; } class PassO { public static void main(String ...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Object-Oriented Programming (2239 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy