hour03_1.cpp
来自「《24学时精通c++》的随书源码的下半部分。欢迎下载学习。」· C++ 代码 · 共 29 行
CPP
29 行
#include <iostream>
int main()
{
std::cout << "The size of an int is:\t\t";
std::cout << sizeof(int) << " bytes.\n";
std::cout << "The size of a short int is:\t";
std::cout << sizeof(short) << " bytes.\n";
std::cout << "The size of a long int is:\t";
std::cout << sizeof(long) << " bytes.\n";
std::cout << "The size of a char is:\t\t";
std::cout << sizeof(char) << " bytes.\n";
std::cout << "The size of a bool is:\t\t";
std::cout << sizeof(bool) << " bytes.\n";
std::cout << "The size of a float is:\t\t";
std::cout << sizeof(float) << " bytes.\n";
std::cout << "The size of a double is:\t";
std::cout << sizeof(double) << " bytes.\n";
std::cout << "The size of an unsigned int is:\t\t";
std::cout << sizeof(unsigned int) << " bytes.\n";
std::cout << "The size of an unsigned short int is:\t";
std::cout << sizeof(unsigned short) << " bytes.\n";
std::cout << "The size of an unsigned long int is:\t";
std::cout << sizeof(unsigned long) << " bytes.\n";
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?