Pointer operators in C: & and *

Pointer is memory address of an object. A pointer variable holds a pointer to an object.

& operator: It is a unary operator which returns memory address of its operand. Example:

a = &b;

Here, a is the memory address and b is the variable.

* Operator: * is a unary operator and is a complement of &. It returns value of variable located at address.  Example:

y= *a

Here, a is the memory address and y receives its value at m.

C program showing use of & and *:

#include <stdio.h>

void main ()


int x, y;

int *a;

y = 25;

a = &y;

x = *m;

printf(“%d”, x);

return 0;


Leave a Reply