Given the following array declaration what is the value stor

Given the following array declaration, what is the value stored in the scores [1][1] element? int scores [3][3]= {1,2,3}, {4,5,6}, {7,8,9};

Solution

The given array defintion is a 3*3 matrix which will be like

9

Now we need to get the value of score[1][1], that means element at location row 1 colun1 (now remeber when we access array we start from index 0 , so here row is 0 1 2 and colums are 0 1 2

Hence element at score[1][1] is 5

1 2 3
4 5 6
7 8

9

Given the following array declaration, what is the value stored in the scores [1][1] element? int scores [3][3]= {1,2,3}, {4,5,6}, {7,8,9};SolutionThe given arr

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site