当我尝试运行它时,我无法理解为什么这个代码会破坏.我使用GCC编译器
#include <iostream>
using namespace std;
int main() {
int arr[] = {0};
for(int x=0; x<6; x++)
arr[x] = x;
for(int y=0; y<6; ++y)
cout<< "arr[" << y <<"] = " << arr[y] << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)