Pointer is a variable which holds the memory address of annother variable. Pointers are represented by '*'. It is derive data type in C. Pointer returns the value of stored address.
< data_type > *pointer_name;
In above syntax,
* = variable pointer_name is a pointer variable.
pointer_name requires memory location
pointer_name points to a variable of type data type.
int *tot;
int tot = 95

In above example, the statement instructs the system to find out a location for integer variable quantity and puts the values 95 in that memory location.
#include< stdio.h > #include< conio.h > void main() { int a = 10; int *ptr; clrscr(); ptr = &a; printf("\n\tValue of a : %d", a); scanf("\n\n\t Value of pointer ptr : %d", *ptr); printf("\n\n\t Address of pointer ptr : %d", ptr); getch(); } output: Value of a : 10 Value of pointer ptr : 10 Address of pointer ptr : -12