int const *ptr;
int *const *ptr;
int **const ptr;
int const **ptr;
I know that whatever is followed by the keyword const cannot be re-written (here I cannot re-write *ptr, *ptr, ptr, **ptr respectively). But I am not sure about the behaviors of the pointers before the keyword const and also unable to find which and all are undefined behavior. It would be helpful if someone can explain me this.
Thanks