Address-of Operator

suggest change

The 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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents