Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Can the * in the function expression be removed?
Can the * in the function expression be removed?

Cannot be removed. After removal, the parameters of the swap(int P1, int P2) function are two integers, and the parameters of swap(int *P1, int *P2) are two pointers, an integer and a pointer. They are different types of variables. Integer is an integer variable, and the pointer is an int pointing to a memory address. *P1 refers to the address of an integer variable rather than the number P1.