Passing a 2D array to function in C
问题 I have a 2d array (a chess board, but this is irrelevant to the problem) and I want to fill it using a function. The one I've written works fine, but after launching the program the console crashes. Any idea where the problem is? Thank you. #include <stdio.h> #include <stdlib.h> void fill(int board[8][8]); int main() { int board[8][8]; fill(board); return 0; } void fill(int board[8][8]) { int a,b; for (a = 1; a <= 8; a++) { for (b = 1; b<= 8; b++) { if ((a==1) || (a==8)) board[a][b] = 7; if (