Hi there! I'm new to C Programming and am taking a class that is an extra-departmental requirement for my major (meteorology).
I need a little assistance on a question that is part of my latest lab assignment dealing with arrays.
The question asks for the values to be stored in array nums after the following code is executed:
Code:
i = 1;
nums [0] = 1;
do {
nums[i] = 2 * nums[i - 1];
i++;
}while (i < A_SIZE);
Being that nums[0]=1 is given and the A_SIZE is 10, I got the result 1,2,4,6,8,10,12,14,16,18 but was told that was incorrect by my professor. I think I'm just making a silly mistake, but would appreciate any guidance in helping me to figure this out.
Thanks!