#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
FILE *fp;
char buf[1];
char a[20];
char b[15];
clrscr();
printf("Enter the path of the file :");
scanf("%s",&a);
fp=fopen(a,"a+");
if(fp==NULL)
{
printf("Error : Not able to Open the file....\n");
getch();
exit(1);
}
printf("Content of a file ....\n");
fseek(fp,0, SEEK_SET);
while( !feof(fp) )
{
fread(buf, 1, 1, fp);
if(buf[0]==',')
{
printf("\t");
}
else
{
printf("%c", (buf[0]));
}
}
fclose(fp);
printf("\nPress any key to leave the process...\n");
getch();
return 0;
}
Look out the code and also there is an one error u find that error and fix it.....