main()
{
FILE *fin;
char line[50];
char exp[SIZE];
fin=fopen("prefix.txt","r");
if(fin==NULL)
{
printf("\nFile Cannot be Opened\n");
}
else
{
printf("\nfile opened\n");
while(fgets(line, sizeof(line), fin)!=NULL)
{
sscanf(line, "%s", exp);
delete_spaces(exp);
convert(exp);
}
}
fclose(fin);
getch();
}
My file is containing string with spaces and when I am reading a line from it, the line is containing only first word and ignoring string after space.