Const char * P and char const * P are modified by * P, so the content pointed to by P pointer will not change.
The const of char * const P modifies the P variable, so the point of P cannot be changed, and the address of the P record remains unchanged, but the content stored on the address can be modified, for more information, seeProgram:
# Include <iostream> <br/> using namespace STD; </P> <p> void main () <br/>{< br/> char * A = "ABC"; <br/> char * B = "BCD "; </P> <p> const char * P = A; <br/> cout <p <Endl; <br/> P = B; <br/> // A = "BCD"; yes, but the P output is still "ABC" <br/> cout <p <Endl; </P> <p> char const * PP = A; <br/> cout <pp <Endl; <br/> PP = B; <br/> // A = "BCD"; yes, but the P output is still "ABC" <br/> cout <pp <Endl; </P> <p> char * const PPP = A; // must be initialized <br/> cout <PPP <Endl; <br/> A = "BCD "; <br/> // PPP = B; cannot run <br/> cout <PPP <Endl; <br/>}