我一直在尝试这个简单的代码和C中的二维数组,不明白为什么我的程序不会失败.
假设指数超出范围?
#include <stdio.h>
#include <stdlib.h>
#define row 20
#define cols 20
int main(int argc, char *argv[])
{
int x,y;
int array[row][cols];
int cc = array[40][40];
return 0;
}
Run Code Online (Sandbox Code Playgroud)
问候
c ×1