Please explain me in detail :
const char *str1 = "pointer to constant";
char *const str2 = "constant pointer";
const char *const str3 = "constant pointer to constant";
str1[0] = 'P'; // illegal!
str1 = "ptr to const"; // ok
str2 = "const ptr"; // illegal!
str2[0] = 'P'; // ok
str3 = "const to const ptr"; // illegal!
str3[0] = 'C'; // illegal!