Answer:
sum = 0;for(j = 0; j < 7; j++)sum = sum + sales[5][j];
Step-by-step explanation:
here we evaluate condition in parenthesis
sum = 0 here variable sum is initialised with 0 value
now for loop executes the condition in parenthesis which is (j = 0; j < 7; j++)
- j =0 is 1st condition which will be executed one time , so j = 0 means index value for loop started is with 0 as you know arrays have index
- j<7 2nd condition for executing the code block which defines loop will go on till the value of j is less than 7 ,as we know the columns in question is 7(this condition must be true)
- j++ 3rd condition means after each iteration value of j will increase +1
- here this condition is true (j = 0; j < 7; j++) till 7th column
- sum = sum + sales[5][j] (sales [row][column] it indicates every 5th row element of each column)