It is also easy to assign literals at declaration, similar to arrays:
It is also easy to assign literals at declaration, similar to arrays:
char* string_pointer= "A string";
The assignment operator may be used at any time after declaration to make one char pointer equal to another.
Attempts to assign one array to another, or to assign a string literal to an array after declaration will lead to compiler errors. Both of these operators are legal with pointers.