The correct answer is D. inventory(4).intQuantity=100.
The array inventory is declared with 4 elements. The last element of the array is inventory(4). The intQuantity member variable is contained in each element of the array. To assign the number 100 to the intQuantity member variable contained in the last array element, we use the following statement:
inventory(4).intQuantity=100
Option A is incorrect because it uses the wrong syntax. The syntax for accessing a member variable of an array element is:
arrayName(index).memberVariableName
In this case, the index is 4.
Option B is incorrect because it uses the wrong member variable name. The member variable name is intQuantity, not Product.
Option C is incorrect because it uses the wrong index. The index of the last element of the array is 4, not 3.