Here's a possible schematic for reading into a 2D array from a file. This presumes you know how many values there are in the file. The exact way you'll do this depends on the exact format of the file, what you know about the file in advance, what tools you have at your disposal (for example vectors instead of arrays) etc.
Code:
int input[3][3];
int i, j, x;
i = -1;
while( i less than 3)
{
j = 0;
increment i;
while(j less than 3)
read in value to x
assign x to input[i][j]
increment j;
}
Once you have read the file into input, then you can manipulate the material, such as adding up the column (or row totals) as posted before.