#include <stdio.h>
void printvalue(int,int *ptrtoarray);//prototype

void main()
{
int x;
int myarray[5]={1,2,3,4,5};
int *ptrtoarray;
ptrtoarray=myarray;//point at the array
x=4; 
printvalue(x,ptrtoarray);
}

void printvalue(int a,int *thepointer)
{
int i;
printf("%d ",a);

for (i=0;i<5;i++)
{
printf("%d ",*thepointer);
thepointer=thepointer+1;  //move through array
}

thepointer=thepointer-2;  //move back
printf("%d ",*thepointer);
thepointer=thepointer-1; //move back
printf("%d ",*thepointer);

}