有一道题如下:
8、 写出以下初始化数组的长度:
①int chn[3];数组 chn 的长度为_。
②float isa[]={1.0,2.0,3.0,4.0,5.0};数组 isa 的长度为_ 。
③int doom[8];数组 doom 的长度为_ 。 ④float pci[4][2];数组 pci 的长度为_ 。
⑤int ast[3][3];数组 ast 的长度为 _。
⑥int att[3][4];数组 att 的长度为 _。
⑦float dell[][3]={{1,4,7},{2,5},{3,6,9}};数组 dell 的长度为_ 。
答案是:6 20 16 32 18 24 36
这个答案我无法理解,数组的长度不就是数组的元素个数吗?如果当做数组的字节长度算,int是4个字节第一空应该是12。求老哥们解释下这题。