Difference: The * operator is used to define the pointer type and dereference the pointer, accessing the value at the memory address pointed by the pointer; while the & operator obtains the address of the variable, passing parameters by reference or transferring the pointer and memory Used in management.
In C language, * and & are two important operators, which represent pointer dereference and address taking operations respectively.
*Operator:
& Operator:
#In short, * is used for declaration and dereference of pointers, while & is used to obtain the address of a variable. These two operators are often used in pointer and memory management in C language.
The above is the detailed content of What is the difference between * and & in C language?. For more information, please follow other related articles on the PHP Chinese website!