ex:
input.csv (fp1)
anil,7.8
syam,9.2
kumar,6.9
suresh,8.6
FILE *fp1, *fp2;
fp1 = fopen ("input.csv", "r");
fp2r = fopen ("output.txt", "w");
fprintf(fp2, "Anil got %f GPA\n", anil);
fprintf(fp2, "Syam got %f GPA\n", syam);
fprintf(fp2, "Kumar got %f GPA\n", kumar);
fprintf(fp2, "Suresh got %f GPA\n", suresh);
In this condition i will take only before "," my variable and after "," variable value.
ex: if i entered anil in program it should be replesed with 7.8
output.txt (fp2)
Anil got 7.8 GPA.
syam got 9.2 GPA.
kumar got 6.9 GPA.
Suresh got 8.6 GPA.
Please let me explain this problem.