I am unable to get this:

as we say int const*ptr; means ptr is a pointer to an const int.

In a example:

int x = 10;
int const*ptr = &x;

//Here *ptr = 12// will give error...

Then if we modify X = 12;// Why there's no error in this case....