Address-of Operator
suggest changeThe unary address-of operator can be applied to an object (for example, a variable, array, union, struct, or pointer) or to a function.
Suppose that
int i = 1;
int *p = NULL;
The statement p = &i; copies the address of the variable i into the pointer p.
It is expressed as p points to i.
printf("%d\n", *p); prints 1, which is the value of i.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents