C++ New And Delete Question:
Download Questions PDF

A friend class in C++, can access the "__________" members of the class in which it is declared as a friend:

a) private and protected
b) private and public
c) public and protected
d) Public

C++ New And Delete Interview Question
C++ New And Delete Interview Question

Answer:

a) private and protected

Download C++ New And Delete Interview Questions And Answers PDF

Previous QuestionNext Question
In the following statement,
const char * const cp = "xyz";

a) Address assigned to pointer cp cannot be changed
b) contents it points to cannot be changed
c) Both of above
d) None of above
A friend function that is a "friend" of a given class is allowed access to ______data in that class.

a) public, private, or protected
b) public or private
c) public
d) protected