Question: C program code: #include / / #define SIZE 5 0 0 int main ( ) { char CSV = ' , ' ; puts (
C program code:
#include
#define SIZE
int main
char CSV ;
putsTimettt Magnitudett Place";
printfs s s s
"Time", "magnitude", "Place";
FILE fpfopendatacsvr;
int ch getcfp;
whilech EOF
putcharch;
ch getcfp;
if feoffp
printf
End of file reached.";
else
printf
Something went wrong.";
printf
Press Enter to exit";
getchar;
return ;
I have a large CSV file.
time,latitude,longitude,depth,mag,magType,nstgap,dmin,rmsnet,idupdated,place,type,horizontalError,depthError,magError,magNst,status,locationSource,magSource
T::ZmwwususmbT::Z km NW of Kuqa, China",earthquake,reviewed,usus
T::Zmwwususmaxr,T::Z km NW of Tobelo, Indonesia",earthquake,reviewed,usus
I need to extract and printout this column, time mag, place
I need to add another column to these threecolumn named cost
Calculatedisplay cost column using the following formula: Magnitude
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
