You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Constant pointer is NOT pointer to constant. Constant pointer means the pointer is constant.
For eg:
Constant Pointer:
int * const ptr1 indicates that ptr1 is a pointer which is constant.
This means that ptr1 cannot be made to point to another integer.
However the integer pointed by ptr1 can be changed.
Where as a Pointer to constant is:
const int * ptr2 indicates that ptr2 is a pointer that points to a constant integer.
The integer is constant and cannot be changed. However the pointer ptr2 can be made
to point to some other integer.