Computer Science, asked by priyankajangid1839, 11 months ago

Which is the odd element in this list constructors, destructive destructor, friend, method?

Answers

Answered by davidcol
0

Answer: Friend

Explanation: Constructors , destructive and method are the parts of Object Oriented Programming. But friend is not . Thus friend will be odd in this case.

Answered by hotelcalifornia
0

Friend is the odd element.

Explanation:

  • All the Constructor, Destructor, Method are member functions, but friend is just a function but it is not a member function.
  • The Constructor will initialise the memory whenever an object is created Destructor will destroy the memory.
  • A method is nothing but a function associated with a class which is responsible for passing the messages which an object of the class receives.
  • Friend function just acts like a friend to a particular class which can only access the private and protected data members of that particular class. It doesn’t even have scope for it.

Learn more about Friend Function:

Write a short note on significance of friend function

https://brainly.in/question/2521691

Characteristics of friend function in c++

https://brainly.in/question/1781964

Similar questions