Answer Posted / supriya
friend function is the one that can access the private data
members of the class to which it is made as friend. this is
advantageous when any class needs any computation which
requires the private data members of two different classes.
in such case that class can be made as friend to both the
classes whose data it needs
| Is This Answer Correct ? | 27 Yes | 4 No |
Post New Answer View All Answers
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
what type of questions
What is the significance of classes in oop?
What is polymorphism explain?
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.
What is abstraction in oop with example?
what are the different types of qualifier in java?
what is the sylabus for priliminaries?
What is purpose of inheritance?
What is class and example?
Why multiple inheritance is not possible?
Describe these concepts: Polymorphism, Inheritance and Abstraction.
what are the realtime excercises in C++?
Can you inherit a private class?
What is oops?what is its use in software engineering?