#include <stdio.h>
main( )
{
FILE *ptr;
char str[30];
ptr = fopen ("Data.tc","r");
clrscr();
if (ptr == NULL)
printf ("unable to open file \ n");
else
{
printf ("File is succesfully opened \n");
fscanf(ptr,"%s",&str);
printf("string = %s",str);
}
getch();
fclose (ptr);
}