/* read a character from KB and store it into the file */
#include
#include
main()
{
	char c;
	FILE *fp;
	clrscr();
	fp=fopen("file3","w");
	if(fp==NULL)
	{
		printf("file opening error");
		return;
	}
	c=getchar();
	while(c!='$')
	{
		fprintf(fp,"%c",c);
		c=getchar();
	}
	fclose(fp);
	getch();
}
/*
Exercise 1: To read char from file3 and display it on the screen until EOF
*/