#include <stdio.h>
void main()
{
FILE *in;
int key;
if ((in = fopen("data.tc", "r")) == NULL)
{
puts("Unable to open the file");
return 0;
}
while (!feof(in))
{
key = fgetc(in);
/* The last character read is the end of file marker */
/* so don't print it */
if (!feof(in))
putchar(key);
}
fclose(in);
getch();
}