#include <stdio.h>

void main()
{
int x=5,y=6,total;

int *ptrx,*ptry,*ptrtotal;		//declare pointer
ptrx=&x;		//point at memory location of x
ptry=&y;		//point at memory location of y
ptrtotal=&total;

printf("%p\n",&x);  //left value
printf("%d\n",x);   //right value

printf("%d\n",*ptrx);  //get contents of x via pointer
printf("%d\n",*ptry);	//get contents of y

*ptrx=35;			//change value of variable via pointer
printf("%d\n",x);

*ptrtotal=*ptrx + *ptry;  //add x and y, store in
						  //total via pointer
printf("%d",total);
}