Jas*_*son 1 c++ arrays sizeof
在这个代码片段中,我得到的输出是24.为什么?
int data[] = { 5, 6, 7, 1, 4, 0 }; int n = sizeof(data); cout << n << endl;
ipa*_*lic 8
sizeof 返回24因为你有6个整数,每个整数占4个字节.
sizeof
归档时间:
7 年,7 月 前
查看次数:
58 次
最近记录: