I have edited the program like this

#include<stdio. h>
void main()
{
FILE *f;
char c,p;
clrscr();
printf("Data Input:\n");
f=fopen("INPUT" ,"w");
p=EOF;
while((c=getcha r())!=EOF)
putc(c,f);
fclose(f);

printf("Data Output:\n");
...