Recently, a friend jokingly asked if int *p * is a pointer or p is a pointer or *p is a pointer, of course, know that p is the pointer
Wild pointer----->>> refers to a pointer that does not point to an address (refer to the previous article for the pointer to the address)
Null pointer---->> pointer to null (NULL) is a null pointer
Other uses of pointers, pointers can point to pointers, pointers can be +-*/operations
/*
Note that each compiler is not the same, there is a wrong way of writing, such as:
int *p,int a=10,b=20;
p=&b;
*p = &a; Cause of Error: *p represents the value that pointer p points to, and &a represents the address of a, the value cannot be equal to an address, the correct notation bit: *p=a; the value of the pointer p to the address is equal to the value of a, which is now b=a=10
Of course, each compiler is different, the individual compiler can compile, print out the *p value is a strange number, this number is not garbled, but a random number, and the address of this random number is a development of the memory value, and this time the pointer p is a wild pointer
*/
The hazard of the wild pointer is quite large, because the wild pointer does not know to point to which block of memory, if the programmer accidentally uses the wild pointer, then may obtain the data which does not want to obtain, very likely causes the program to crash, the flash back and so on danger/harm, after I repeatedly knocked out the wild pointer, discovered a wild pointer harm law, The greater the hazard of the wild pointer
C language pointer 2 (null pointer, wild pointer)