运行 ❯
获取您
自己的
网站
×
更改方向
更改主题,深色/浅色
转到空间
#include <iostream> using namespace std; int main() { int myInt = 5; long int myLInt = 5; float myFloat = 9.99; 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; }
4
8
4
8
1
8