int main() {
int my array[3][3] =
10, 23, 42,
1, 654, 0,
40652, 22, 0
};
printf("%d\n", my_array[3][3]);
return 0;
}
I am not able to get the array to print.. Any ideas why? I am a beginning programmer so any words of advice are appreciated.
What you are doing is printing the value in the array at spot [3][3], which is invalid for a 3by3 array, you need to loop over all the spots and print them.
This will print it in the following format
if you want more exact formatting you’ll have to change how the printf is formatted.