123456789101112131415161718192021222324252627 |
- #include <iostream>
- int main2()
- {
-
-
-
- short num1 = 10;
- std::cout << "short占用的内存空间为:" << sizeof(short) << std::endl;
- int unm2 = 10;
- std::cout << "int占用的内存空间为:" << sizeof(int) << std::endl;
- long num3 = 10;
- std::cout << "long占用的内存空间为:" << sizeof(long) << std::endl;
- long long num4 = 10;
- std::cout << "long占用的内存空间为:" << sizeof(long) << std::endl;
-
-
- system("pause");
- return 0;
- }
|