Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is a character pointer?
What is a character pointer?
The answer is that pointer variables of unsigned char type are called character pointers.

For example:

Unsigned character ch =' a

Unsigned character * ch _ p =&ch;

Then the pointer variable ch_p is the character pointer.

In addition, some pointer variables pointing to char types can also be character pointers, because the range of char types is

-128 ~ 127, the ASCII code value corresponding to the character ranges from 0 to 255, so-128 ~-1 cannot represent the character!

A string pointer is a pointer variable that points to the first address of a string. Because it is a string, the type it points to is char, for example:

char * str = " hello world

Then the pointer variable str is a string pointer variable, pointing to the first address of the string constant "hello world"!