Question: 6. Complete the following code to fill an array, then select the correct continuation test for the for-loop. int main () { int size,
6. Complete the following code to fill an array, then select the correct continuation test for the for-loop. int main () { int size, i; scanf("%d", &size); int arr[size]; for(i=1; ( scanf("%d", printf("%d", arr[0]); ; i++) _); } a. The code will not work with any continuation test because the first element read is saved in position [1]. the array instead of index position [0]. b. i < size+1, because a variable (size) is used to store the array length. C. It is impossible to say what the continuation test should be because we do not know ahead of time how large size is. d. Because the array values are obtained by reading in values inside the loop, we must use i < arr[size]. e. i
Step by Step Solution
There are 3 Steps involved in it
The correct continuation test for the forloop in the given code depends on the desired behavior and ... View full answer
Get step-by-step solutions from verified subject matter experts
