C++ New And Delete Question:
Download Questions PDF

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

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

Answer:

c) Both of above

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

Previous QuestionNext Question
int const *ptr1 = &m;

// this is example of,

a) Constant pointer
b) Pointer to a constant
c) Both of above
d) None of above
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