Multiple Choice
int [ ] anArray = new int [10]; int [ ] anotherArray = {6, 7, 4, 5, 6, 2, 3, 5, 9, 1};
Foreach (int val in anotherArray)
Total += val;
Using the above declaration along with the foreach loop, what is stored in total after the program statements are executed?
A) 10
B) 2
C) 48
D) 45
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q43: Given an array declaration of int anArray[1000],
Q44: int [ ] score = {86, 66,
Q45: If you do not know how many
Q46: Arrays are reference variables.
Q49: Array identifiers are normally defined using a(n)
Q50: int [ ] anArray = new int
Q51: Which of the following could be a
Q52: For an array that is dimensioned with
Q53: To access an array element, you must
Q70: Array identifiers are normally defined using a