40 - sizeof

2018-01-02  本文已影响0人  社交帐号直接注册
#include <iostream>
using namespace std;

int main()
{
    char c;
    cout << sizeof(c) << endl;
    int a;
    cout << sizeof(a) << endl;
    double b;
    cout << sizeof(b) << endl;
    double bucky[10];
    cout << sizeof(bucky) << endl;
    cout << sizeof(bucky)/sizeof(bucky[0]) << endl;
    return 0;
}
上一篇 下一篇

猜你喜欢

热点阅读