I guess it depends what you want to add up. A 2d array is like a table of rows and columns.
If you wanted to add up all the numbers in one row, you'd hold the row number fixed and iterate through the column numbers. Or if you wanted to add up all the numbers in one column, you'd hold the column number fixed and iterate through the row numbers.