I. ONE-DIMENSIONAL ARRAY: Given the declaration statements below, provide what is
being asked in each item.
String prodName[] = {“Nova”, “Ding-Dong”, “Mr. Chips”, “Clover”, “Cheetos”, “Oreo”};
1. What is the name of the array declared? (1 point)
2. What is the data type of the array declared? (1 point)
3. What is the size or length of the array declared? What does that mean? (3 points)
4. What is the subscript of the last element? (1 point)
5. What is the subscript of the first element? (1 point)
6. What is the subscript of the 4th element? (1 point)
7. What is the 3rd element? (1 point)
8. What is the 6th element? (1 point)
9. What is the 5th element? (1point)
10. What is the value of prodName [3]? (1 point)
11. What is the value of prodName[5]? (1 point)
12. What is the value of prodName [1]? (1 point)
13. What is the value of prodName[0]? (1 point)
Comments
Leave a comment