Question: ( 1 ) Array index starts with what number? ( 2 points ) ( 2 ) Solve ( hand calculate ) the output y

(1) Array index starts with what number? (2 points)
(2) Solve (hand calculate) the output "y" from the following program. (3 points)
(3) Show the manual process and calculation how you get the output. (5 points)
int i, j, y =0, x[3][3]={{1,2,4},{8,16,32},{64,128,256}};
for (i =1; i <10; i +=4)
for (j =1; j <6; j +=2)
y += x[i%3][j%3];
cout << y << endl;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!