# Consider the linear arrays AAA(5: 50), BBB(-5: 10) and CCC(18). (i) Find the number of elements in each array. (ii) Suppose Base(AAA) 300 and w=4 words per memory cell for AAA. Find the address of AAA, AAA and AAA Let’s break this down step by step:

(i) To find the number of elements in each array, you can use the given array dimensions:

– AAA(5:50): This means AAA has elements from index 5 to 50. To find the number of elements, you subtract the lower bound from the upper bound and add 1 (to include both bounds). So, for AAA: 50 – 5 + 1 = 46 elements.

– BBB(-5:10): Similarly, for BBB: 10 – (-5) + 1 = 16 elements.

– CCC(18): Since CCC has only one index specified, it has a single element.

So, the number of elements in each array is:
– AAA: 46 elements
– BBB: 16 elements
– CCC: 1 element

(ii) To find the address of AAA, AAA, and AAA, you need to consider the base address and the word size:

– Base(AAA) = 300
– Word size (w) = 4 words per memory cell for AAA

To find the address of an element at index i in AAA, you can use the following formula:
Address(AAA[i]) = Base(AAA) + (i – lower bound) * word size