C++ New And Delete Question:

Download Job Interview Questions and Answers PDF

int const *ptr1 = &m;

// this is example of,

a) Constant pointer
b) Pointer to a constant
c) Both of above
d) None of above

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

Answer:

b) Pointer to a constant

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

Previous QuestionNext Question
char * const ptr1 = "nice";

//this is example of ,

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