UrbanPro

Learn Programming Languages from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is a friend function in C++ ?

Asked by Last Modified  

Follow 0
Answer

Please enter your answer

IT

Friend function is a non- member function of a class and it has special privileges to access the private members of a class. if any function declare preceding with "friend" keyword and outside of the class such function is called as friend function.
Comments

Linux Trainer And developer

For this you must have the knowledge of OOP first. That what is Inheritance, Well as the name says friend. Instead of inheritance a friend function or variable can access your class. Check this example as here this function is not a member of any class but in class box it is declared as friend, so...
read more
For this you must have the knowledge of OOP first. That what is Inheritance, Well as the name says friend. Instead of inheritance a friend function or variable can access your class. Check this example as here this function is not a member of any class but in class box it is declared as friend, so you can access it with class constraints. read less
Comments

A friend function is a function defined outside a class scope and declared in the class definition as friend function. Even though a friend function is not a member of a class its is still has the right to access all private and protected members of the class.
Comments

CS Master

One of the important concept of OOP is data hiding, i.e., a nonmember function cannot access an object's private or protected data. But, sometimes this restriction may force programmer to write long and complex codes. So, there is mechanism built in C++ programming to access private or protected data...
read more
One of the important concept of OOP is data hiding, i.e., a nonmember function cannot access an object's private or protected data. But, sometimes this restriction may force programmer to write long and complex codes. So, there is mechanism built in C++ programming to access private or protected data from non-member function which is friend function and friend class. read less
Comments

View 2 more Answers

Related Questions

Explain about protected internal access specifier?
protected access specifier is used in inheritance. Base class members are made accessible to its sub classes through protected access specifier. This access specifier works with in inheritance.
Sahiba
0 0
7

Is C language is used for hack or not?

Yes its is used for hacking purpose.
Jangam
What is a calling function in C?
A calling function is a way to execute a block of code that's defined elsewhere in your program. It's like asking a specialized worker to perform a specific task within your main project. It promotes code organization, reusability, and modularity.
Deepika
0 0
6
What are global variable in php ?
Global Variable we can declare the outside the function and another page .The PHP super global variables are: $GLOBALS $_SERVER $_REQUEST $_POST $_GET $_FILES $_ENV $_COOKIE $_SESSION
Ajay
What is the fee for php classess?
Php class fess:- Rs. 9k html css js core and adv php MySQL PDO and ajax
Manjunath

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Write your first Python program in 10 minutes
1. Download python from python official site search "python download" in google 2. Install in your machine 3. verify using : "python --version" command 4. Write first program using notepad create...

Bit-wise operators
Operation Syntax Function Bitwise And a & b and_(a, b) Bitwise Exclusive Or a ^ b xor(a, b) Bitwise Inversion ~ a invert(a) Bitwise Or a b or_(a, b) Left...

Coding for Children: Scratch
What is coding? Coding has become a must-have skill in this 21st century. Coding, or computer programming, is how we communicate with Devices. Code mentions the machine what moves to make, and composing...

Two lists using Loops - Python Program 1
To generate a list of all possible combinations of two lists using loops, you can use nested loops to iterate through both lists and create a new list that contains all the combinations. list1 = list2...

Python breaks into the top three programming languages in the Tiobe Index for the first time.
Python breaks into the top three programming languages in the Tiobe Index for the first time. The popularity of Python shows no sign of waning, with the programming language entering the top three in...

Recommended Articles

Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today.  In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...

Read full article >

Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Looking for Programming Languages Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Programming Languages Classes?

The best tutors for Programming Languages Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Programming Languages with the Best Tutors

The best Tutors for Programming Languages Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more