How to avoid reading semicolon ; in FILE and save them in variable?
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
char gstitem[6], gstname[30],;
int gstquant, itemquant;
float gstprice;
char string[10];
printf("Purchase items fuction\n\n");
FILE *gstPtr;   //pointer to the gst.txt
gstPtr = fopen ( "gst.txt", "r+" );
printf("Enter an item code: ");
fgets(string,10,stdin);
(!feof(gstPtr));
{   
    fscanf(gstPtr,"%[^;]s %[^;]s %[^;]f %[^;]d\n",gstitem,gstname,&gstprice,&gstquant);
    printf("%s  %s  %f  %s\n",gstitem,gstname,gstprice,gstquant);
    }
fclose(gstPtr);
}
This is the file that i want to fscanf vv
 
     
    