1)实验代码:
#include <stdio.h> int main() { int a[3]={1,2}; for(int i = 0; i < 3; i++) { printf("%d\n",a[i]); } return 0; }
2) 实验结果:
120请按任意键继续. . .
3)思考:
int a[3]={1,2};没有对全部数组元素进行初始化,编译却没报错
Powered by: 博客园 Copyright © 2024 蔡諝 Powered by .NET 9.0 on Kubernetes