Difference between const char*ptr and char *const ptr please give detailed explaination with examples
The first one says that ptr is a pointer to a const char, but that the pointer can be modified. The second says that the ptr is const, but the char is modifiable. If that isn't detailed enough, or exemplar enough, let me recommend your documentation, or Google.
const char* ptr means "ptr points to a char that is constant" — that is, the char can't be changed via ptr. char * const ptr means "ptr is a constant pointer to a char" — that is, you can change the char via ptr, but you can't change the pointer itself.