C program to parse csv files