In C++, the $friend$ keyword allows a class or function to access the private and protected members of another class. When one class (let's call it Class A) declares another class (Class B) as its $friend$, it grants specific access privileges.
The declaration of friendship is asymmetric. When Class A declares Class B as a friend:
Therefore, the correct statement is that all member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship.
| List I | List II |
| A. Overloading | I. Since function call is resolved during run time, the execution is Slow. |
| B. Early binding | II. Since function call is resolved during compilation time, the execution is much faster. |
| C. Overriding | III. Supports compile-time polymorphism. |
| D. Late Binding | IV. Supports run-time polymorphism. |
Which operator is used for dynamic memory allocation in C++?
| LIST-I (file mode parameters) | LIST-II (Meaning) |
|---|---|
| A. ios::ate | I. Go to end of file on opening |
| B. ios::in | II. Open fails if the file already exists. |
| C. ios::nocreate | III. Open file for reading only |
| D. ios::noreplace | IV. Open fails if the file does not exist. |