W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
#include
using namespace std; int main() { int myInt = 5; long int myLInt = 5; float myFloat = 9.99; const char* myString = "Hello World!"; cout << sizeof(myInt) << "\n"; cout << sizeof(myLInt) << "\n"; cout << sizeof(myFloat) << "\n"; cout << sizeof(myString) << "\n"; cout << sizeof(char) << "\n"; cout << sizeof(double) << "\n"; return 0; } // 64 位非 Windows 系统输出: // 4 // 8 // 4 // 8 // 1 // 8