I've been having this problem: when I try to print an array with 2 for loops nothing happens, blank screen. When I add a printf preceding the loop (anything like printf("1");) the loop printing shows in the execution.
The code:
for(j=0;j<i;j++){
printf("\n");
for(k=0;k<i;k++){
printf("%6d",*(polje+j*i+k));
}
}
Not only does the program not print the loop, it says x.exe stopped working if I don't use another printf outside the loop.
for (int j = 0; j < i; j++) { for (int k = 0; k < i; k++) printf("%6d", polje[i*j+k]); putchar('\n'); }.