Constant pointer vs Pointer to constant [duplicate]

I want to know the difference between

const int* ptr;

and

int * const ptr; 

and how it works.

It is pretty difficult for me to understand or keep remember this.
Please help.

8 Answers
8

Leave a Comment