So why is this code throwing a access violation exception?
Everything is set up normally to initialize an array and print off some of its contents.
The msg im getting is
Unhandled exception at 0x00411787 in Matrix.exe: 0xC0000005: Access violation reading location 0x00030000.
Here is the code
Code:
#include <stdio.h>
int main(void){
int A[1000][100];
int B[1000][100];
int i, j;
printf("My C program\n");
printf("After Array init\n");
for (i = 0; i<1000; i++){
for (j = 0; j<100; j++){
A[i][j] = (i*j)/10;
B[i][j] = (i*j)/10;
}
printf("i %d\n", i);
}
printf("\nAfter Array values assigned\n");
for (i = 0; i<10; i++){
printf("\n");
for (j = 0; j<10; j++){
printf("A %d",A[i][j]);
printf("B %d",B[i][j]);
}
}
printf("\nAfter Array values printed\n");
return 0;
}
Your help is greatly appreciated.