239 views
0 votes
0 votes
let A(1:8, -5:5, -10:5) be a three dimentional arrey. how many elements are there in the arrey A

1 Answer

0 votes
0 votes
No of elements in 3d=No of elements in 1st dimension*No of elements in 2dimension*No of elements in 3rd dimension(by dimension I mean the index)

Number of elements in first dimension= upper limit - lower limit + 1 = 8 - 1 + 1 =8

Number of elements in second dimension of array = 5 - (-5) + 1 = 11

Number of elements in third dimension of array = 15 - (-10) + 1 = 16

Hence, total number of elements = 8 * 11 * 16 = 1408

Related questions

0 votes
0 votes
1 answer
1
Saurabhgate2024 asked May 14, 2023
472 views
We have stored an element after a few elements in an array, where the array size is unknown, then find the position of in array.
1 votes
1 votes
1 answer
3
admin asked Jan 26, 2023
465 views
Consider rolling of a dice experiment. Let $\text{A}$ be the event of getting an even number and $\mathrm{B}$ be the event of getting a prime number. Write the sets repre...
1 votes
1 votes
1 answer
4
admin asked Jan 26, 2023
262 views
Consider rolling of a dice experiment. Let $\text{A}$ be the event of getting an even number and $\mathrm{B}$ be the event of getting a prime number. Write the sets repre...