Number of elements in a two-dimensional array having 5 rows and 3 columns is 8. State whether the statement is True (or) False And Justify it
Answers
Answered by
0
False,no of elements are 15 as it is tabular representation not linear so we can't simply add up rows and columns.
Answered by
1
The statement is false.
We can use the below formula to calculate the number of elements in a two dimensional array :
The array arr[n1][n2] can have n1*n2 elements.
The array that we have in the example below is having the dimensions 5 and 3. These dimensions are known as subscripts.
So this array has first subscript value as 5 and second subscript value as 3.So the array abc[5][4] can have 5*3 =15 element
Similar questions
Political Science,
7 months ago
Math,
7 months ago
Social Sciences,
1 year ago
Economy,
1 year ago
Computer Science,
1 year ago