以下数组定义中错误的是( )。

admin2013-02-23  40

问题 以下数组定义中错误的是(    )。

选项 A、int x[][3]={0};
B、int x[2] [3]={{1,2},{3,4},{5,6}};
C、int x[][3]={{1,2,3},{4,5,6}};
D、int x[2][3]={1,2,3,4,5,6};

答案2

解析 选项B)中行数定义为2,但实际需要存放3行元素,所以错误。
转载请注明原文地址:https://kaotiyun.com/show/7lPp777K
0

最新回复(0)