adspace
What do you understand by friend-functions? How are they used?
Answer Posted / Rahul Harshawardhan
"Friend functions are non-member functions that have access to private and protected members of a class in C++. They are defined outside the class definition and can be used for performing operations on objects without being a member of the class. Friend functions are useful when it is necessary to write a function that requires direct access to the private or protected members of a class, but doesn't need to be associated with any specific object.".
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
i have a written test for microland please give me test pattern
ATM machine and railway reservation class/object diagram
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
swap 2 numbers without using third variable?
What are compound statements?
What is dynamic dispatch in c++?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
Explain the difference between null pointer and void pointer.
How do you convert strings to numbers in C?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
Do you know the difference between malloc() and calloc() function?
What is the general form of a C program?
How do you determine the length of a string value that was stored in a variable?