Computer Science, asked by ramanmittal190, 4 months ago

1)
Question:
What is the output of C program with multidimensional array?
int maino
{
int ary[3][2] = {1,2,3,4,5,6};
printf("%d %d", ary[0][0], ary[2][1]);
retum 0:
}
A 25
B. 1 6
C. 1 5
D. 2 6​

Answers

Answered by adityawakkar05
0

Answer:

B is the right answer

Explanation:

Answer B is correcr

Answered by remyanairlm
0

Answer:

The given program statements print 1 6.

Explanation:

Given:

int ary[3][2] = {1,2,3,4,5,6};

The above statement creates the following array ary having 3 rows and 2 columns as follows:

1 2

3 4

5 6

Now, printf("%d %d", ary[0][0], ary[2][1]);

The ary[0][0] element is 1 and

The ary[2][1]) element is 6

Therefore, the above statement prints 1 6.

Similar questions