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] ?
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.
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 . For the given array My_Arr[5][20] , the size is 5 × 2 0 . It means that you can store 100 data items in the given array.