You could also go the C route, open the file, read each line into one array (char**), use atoi (or atof or whatever) to get another array of actual numbers, then sum over that array.
@ky0ko Actually, now that I think about it, assuming you know what your data is, you could just use fscanf instead of going the read into one array then atoi into another route