Let A(1:8, -5:5, -10:5) be a three dimensional array. How many elements are…

2013

Let A(1:8, -5:5, -10:5) be a three dimensional array. How many elements are there in the array A?

  1. A.

    1200

  2. B.

    1408

  3. C.

    33

  4. D.

    1050

Attempted by 381 students.

Show answer & explanation

Correct answer: B

To find the total number of elements in a multidimensional array, calculate the size of each dimension and multiply them together.

Dimension 1 (1:8): 8 - 1 + 1 = 8 elements.

Dimension 2 (-5:5): 5 - (-5) + 1 = 11 elements.

Dimension 3 (-10:5): 5 - (-10) + 1 = 16 elements.

Total elements = 8 × 11 × 16 = 1408.

Explore the full course: Isro