Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - The difference between int *p=NULL and int *p; p=NULL and *p = NULL
The difference between int *p=NULL and int *p; p=NULL and *p = NULL

The first is to define an int pointer and initialize it to NULL, which is a null pointer. If it does not point to anywhere, it is empty.

The second is to define an int pointer, then assign the pointer to NULL, and the pointer points to the NULL address.

The third method is to assign NULL to the value of the pointer, that is, assign a value of 0 (that is, empty) to the content pointed to by the pointer.