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

Please check my work on the following questions! I think I got most of them, but

ID: 3561858 • Letter: P

Question

Please check my work on the following questions! I think I got most of them, but I don't want to get any points taken off for this assignment! I'm only interested in people that can code this in C++. Don't bother answering otherwise.

Given the following code segments, fill in the table below with the codes ouput using U for places that are undefined. PLEASE ASSUME ALL CODING ERRORS (i.e. forgot to add curly braces to for loop, etc, are my fault and not relavant.)

a) int i, j=1;

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

   exampleA[i][j] = i*j;

b) int exampleB[ 4 ][ 3 ];

int i, j;

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

for( j=0; j<3; j++)

   exampleB[ i ][ j ] = i * j;

c) int exampleC[ 4 ][ 3 ];

int i, j;

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

for( j=0; j<3; j++)

   exampleC[ i ][ j ] = (i + j) % 3;

c) int exampleD[ 8 ][ 2 ];

int i, j;

exampleD[ 7 ][ 0 ] = 4;

exampleD[ 7 ][ 1 ] = 5;

for( i=0; i<7; i++){

   exampleD[ i ][ 0 ] = 2;

exampleD[ i ][ 1 ] = 3;

}

0 1 2 3 0 1 2 3

Explanation / Answer

a) int i, j=1; for( i=0; i