txt. file to 2d array

So I have this file called data.txt It looks like this:
Deaths Doctors Hosp Income Population
8.00 78 284 9.10 109
9.30 68 433 8.70 144
7.50 70 739 7.20 113
but it has significantly more lines of data. I need to write a program that reads this data into arrays. It must implement the a function that takes as input an array and array size and returns the mean value. Please point me in the correct direction, I'm so lost.
Do you know how many lines of data the file contains?
Lets say 100 lines of data.

First you need to declare the arrays - one for each topic.

1
2
3
#define NUM_ENTRIES  100

float DeathNumbers[NUM_ENTRIES];

The same for Doctors, Hosp etc.

Next step you open the file and read the data.

Then you need to write a function that calculates the mean value of an array.

Finally you need to output the results.
Can you explain the steps for putting the file into the array. I can do the rest, but I'm stuck on that part specifically.
Topic archived. No new replies allowed.