C program to read alternate values from a file

// Read alternate values from a file c programming.
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,a,v;
clrscr();
FILE *p;
printf("enter the limit: ");
scanf("%d",&n);
p=fopen("values","wb");
printf("enter the numbers: \n");
for(i=0;i<n;i++)
{
scanf("%d",&a);
putw(a,p);
}
fclose(p);
p=fopen("values","rb");
printf("Alternative numbers are: \n");
a=getw(p);
while(!feof(p))
{
printf("%d\t",a);
fseek(p,2,1);
a=getw(p);
}
fclose(p);
getch();
}

Output

file program in c to read alternate values
C program to read alternate values from a file