+ 1

Input .csv to output .txt

Suppose I have .CSV file like this Name GPA Syam,9.7 Kumar,8.9 Anil,7.9 Suresh,8.7 Out put should come like this Suresh got 8.7 GPA Syam got 9.7 GPA Anil got 7.9 GPA Kumar got 8.9 GPA But in the program I will write only names ( before comma values) it should replace number ( after comma values) Ex. fprintf(fp2, "Syam got %f GPA", syam); Whatever write name here it should replace with after comma value (9.7) Ex. fprintf(fp2, "Average GPA of Syam and Kumar %f GPA", (syam+Kumar)/2); Note: I want to print in fp2 sum names only. Not all the names. It should like global variables. Before " , " global variable and after " , " global variable value. Please let me know, if anyone knows this solution.

27th Nov 2018, 6:03 AM
Syam Kumar
Syam Kumar - avatar
5 Antworten
+ 7
Like all good questions, create a C project here and copy/paste your entire solution there. By doing so, you increase the chance of getting your desired solution.
27th Nov 2018, 7:11 AM
Babak
Babak - avatar
27th Nov 2018, 8:19 AM
Prokopios Poulimenos
Prokopios Poulimenos - avatar
0
Thank you very much, I will try this.
27th Nov 2018, 9:07 AM
Syam Kumar
Syam Kumar - avatar
0
Getting error while running this program. I am using codeblocks
1st Dec 2018, 5:28 AM
Syam Kumar
Syam Kumar - avatar
0
/*Getting this error in code blocks. Please help me. ||=== Build: Release in main (compiler: GNU GCC Compiler) ===| obj\Release\main.o:main.c:(.text.startup+0xac)||undefined reference to `getline'| ||error: ld returned 1 exit status| ||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| */
19th Dec 2018, 4:02 PM
Syam Kumar
Syam Kumar - avatar