void test(int n) {
int array1[n] = {0}; //then all elements are 0
int array2[n][n] = {0}; //or {{0}}; then the first line is not 0, others are 0
}
int main() {
test(10);
return 0;
}
为什么对于array2,第一行的元素不为0,为什么在内存中,postion在堆栈中不是堆?
谢谢!