Hey guys.
None of my books tell me how to do this so im wondering if its even possible, but say i have an array like this:
Code:
int myArray[4][4] = {
{ 1,2,3,4 },
{ 5, 6, 7, 8 },
{ 7, 10, 11, 12 },
{ 13, 14, 15, 16 }
};
Its it possible to calculate and find the total of only the top row?
I know I can do it via an index like this:
Code:
int totalRow = myArray[0][0] + myArray[0][1] ...etc
But is there a simpler way to do that, as if I have a large array with say over 10
columns in size I really do not want to create a huge expression per row.
Any advice appreiciated guys