Question: What output is produced by the following code? int i; int [ ] anArray = new int [5]; for (i = 0; i < anArray.Length;
What output is produced by the following code?
int i;
int [ ] anArray = new int [5];
for (i = 0; i < anArray.Length; i++)
anArray[i] = 2 * i;
for (i = 0; i < anArray.Length; i++)
Write(anArray[i] + " ");
a. 22222
b. 246810
c. 0246810
d. 02468
e. none of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
