Answer Posted / mital
A friend function is used in object-oriented programming to
allow access to private or protected data in a class from
outside the class. Normally a function which is not a
member of a class cannot access such information; neither
can an external class. Occasionally such access will be
advantageous for the programmer; under these circumstances,
the function or external class can be declared as a friend
of the class using the friend keyword. The function or
external class will then have access to all information –
public, private, or protected – within the class.
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
What is destructor example?
What are properties in oop?
What is abstraction with example?
How do you explain polymorphism?
what is the sylabus for priliminaries?
What is object in oop?
Who invented oop?
What does and I oop and sksksk mean?
How long to learn object oriented programming?
What is the use of oops?
What is abstraction in oop?
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
Can bst contain duplicates?
How Do you Code Composition and Aggregation in C++ ?
Which language is pure oop?