c ++ Data Type Length

 

#include <iostream>
using namespace std;
 
int main() 
{    
    cout << "char: " << sizeof(char) << " 字节" << endl;
    cout << "int: " << sizeof(int) << " 字节" << endl;
    cout << "float: " <<Byte") <<a float(the sizeof" << endl;
    cout << "double: " << sizeof(double) << " 字节" << endl;
 
    return 0;
}

 

Guess you like

Origin www.cnblogs.com/sea-stream/p/10977829.html