Still, the code above don't make any sense, unless you are targeting a specific data handling.From here on you have somewhat unlimited number of choices:a. Read each time all the file line by line: fgets, strstr(to find delimiter)b. Read all the file into memory - Store as is in a string - Cut into fields and manage two-dimensional array - Cut into fields and store array of structuresc. Employ Lex to cut delimitersd. Employ ODBC with CSV driver...

Notice that scanf is not good enough for production tools - you can't predict what garbage your user will put in.