Answer:
The solution is implemented using C++
int getRowTotal(int a[][5], int row) {
int sum = 0;
for(int i =0;i<5;i++)
{
sum += a[row][i];
}
return sum;
}
Step-by-step explanation:
This defines the getRow function and the parameters are arr (the 2 d array) and row and integer variable
int getRowTotal(int arr[][5], int row) {
This defines and initializes sum to 0
int sum = 0;
This iterates through the row and adds the row items
for(int i =0;i<5;i++) {
sum += arr[row][i];
}
This returns the calculated sum
return sum;
}