I have a data set in .txt format and want to do some arithmetic operation on the data set using C code. How to do the job? I want to make the text data into a 2D-array. The data set is like this:
1st col - year, 2nd col-January rainfall, 3rd col-Feb rainfall, 4th col-March rainfall
How much do you already know how to do? Do you know how to open a file and read it one word at a time? (A word is all the characters between spaces). Have you tried to code that program yet? If not, you should.
Well, 1st of all, you should check the problem info/statement and analyse it a bit.
You have to have in the end a 2x2 array, meaning with everything that is in the file, like a maxtrix.
I don't know on what os are you trying to code. If you do code on UNIX than go to terminal and write man (from manual) fopen, or man popen, or just system call open() and see what happens.
After that, you should check the functions of the FILE *fd items - read/write.
A quick search on google wouldn't had hurt you would it? http://www.phanderson.com/files/file_read.html
Start small, with small scripts, and than after you feel stable on your knowledge try doing the actual homework.
Hope my advices helped you.
If you have further questions let us know, but first I want to see you tried.
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"