Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1.) Given: int array[6] = { 3, 5, 8, 2}; Question 1 options: Only four elements

ID: 645406 • Letter: 1

Question

1.)

Given:

int array[6] = { 3, 5, 8, 2};

Question 1 options:

Only four elements in the array are initialized.

None of the array elements are initialized.

All elements are initialized.

Code is incorrect

2.)

Given:

int array[3][6];

int i;

for (i=0; i<6; i++)

   array[2][i] = 3;

Question 2 options:

The elements of the last row of the array are set to 3

The elements of the last column of the array are set to 3

The elements of the first row of the array are set to 3

The element of the first column of the array are set to 3

Only four elements in the array are initialized.

None of the array elements are initialized.

All elements are initialized.

Code is incorrect

Explanation / Answer

Answer Q1. Only four elements in the array are initialized

Answer Q2. The elements of the last row of the array are set to 3