Size of a 2D-Array

Size of an Array is the total number of elements in it.

What is the size of the 2-D array declared as My_Arr[5][20] ?

5 × 20 5 \times 20 6 × 21 6 \times 21 4 × 21 4 \times 21 4 × 19 4 \times 19

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Zeeshan Ali
Jan 10, 2016

A 2-D array declared as Array_Name[m][n] is said to contain m rows and n columns or vice versa. Hence the size of (or the capacity to store data items in) it is m × n {m} \times {n} . For the given array My_Arr[5][20] , the size is 5 × 20 \boxed {{5} \times {20}} . It means that you can store 100 data items in the given array.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...