Q:

Like any other constant pointer, a constexpr pointer may point to a const or a nonconst type

0

Like any other constant pointer, a constexpr pointer may point to a const or a nonconst type.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

constexpr int *np = nullptr; // np is a constant pointer to int that is
null
int j = 0;
constexpr int i = 42; // type of i is const int
// i and j must be defined outside any function
constexpr const int *p = &i; // p is a constant pointer to the const int i
constexpr int *p1 = &j; // p1 is a constant pointer to the int j

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now