#include <stdio.h>

void main()
{
int x;   //creates a space in memory
int *ptrx; //declare pointer
int *ptrtotal;
int total;
ptrx=&x; //point to memory address of x
ptrtotal=&total;//point to memory addres of total

x=5;
printf("%p ",&x);//memory location (left value)
printf("%d\n",x);//content
printf("\n\n");

printf("%d",*ptrx);//value of x via pointer

//x=7; //change value x via variable
*ptrx=7;//change value of x via pointer 
		//(high performance)
*ptrtotal =*ptrx * 2;  //same as total=x * 2;





}