Two forms of the string:
1, character arraychar name[32] = "Zhangsan";//can only be done at initialization timestrcpy (name, "Lisi");//Overall assignment can only be done by strcpyname = "Lisi";//error, assigns the address of a constant string ("Lisi") to the constant pointer (char* const name)2. Character Pointerchar *name = "Zhangsan";//pointer variable name points to the start address of a constant stringchar* name;//using wild pointers (uninitialized pointers)scanf ("%s", name);//error,strcpy (name, "Lisi");//error, if name points to a constant string, it will collapse. If name is not initialized, it is possible for the program to collapse and potentially overwrite the data in memory. name = "Lisi";//ok, re-modifies the pointer variable name to point to a new string address. 1, const int* p and int const* p: The meaning of the two is the same. The point is read-only data and cannot be changed by Q, but the address pointed to can be changed. 2, int* const P: The pointer must first be initialized, and the point of the address is read-only, can not be changed again, but the point of the content can be changed. 3. Const int* Const P: You can neither change the address pointed to by the pointer, nor change the content that the pointer points to.
C Language: Several forms of pointers