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

include #define SIZE 4 int main() { int i, j; // start code written by student /

ID: 3659750 • Letter: I

Question

include #define SIZE 4 int main() { int i, j; // start code written by student // int my_arr[SIZE][SIZE]; for (i = 0; i < SIZE; i++) for (j = 0; j < SIZE; j++) if (j >= SIZE-i) my_arr[i][j] = 1; else my_arr[i][j] = 0; // end code written by student // for (i = 0; i < SIZE; i++) { for (j = 0; j < SIZE; j++) printf("%d ", my_arr[i][j]); printf(" "); } return 0; output: 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 Give a few examples of the output. I'm not too sure what the for loops mean here, with regards to size.

Explanation / Answer

#include #define SIZE 4 //this here is like a constant variable int main() { int i, j;//declare counter variable // start code written by student // int my_arr[SIZE][SIZE];//declare a 4x4 array for (i = 0; i =4 my_arr[i][j] = 1; //set element to 1 else my_arr[i][j] = 0; //else, set to 0 // end code written by student // for (i = 0; i