📄 main.cpp
字号:
#include <iostream>
#include <stdlib.h>
using namespace std;
int main(int argc, char *argv[])
{
signed char ch = '\n';
ch = 128;
cout << endl << "short int" << endl;
short int hoopla;
hoopla = 0x0000;
cout << "0x0000: " << hoopla << endl;
hoopla = 0x0001;
cout << "0x0001: " << hoopla << endl;
hoopla = 0x7fff;
cout << "0x7fff: " << hoopla << endl;
hoopla = 0x8000;
cout << "0x8000: " << hoopla << endl;
hoopla = 0xffff;
cout << "0xffff: " << hoopla << endl;
cout << endl << "bool" << endl;
bool b = true;
cout << b << endl;
b = false;
cout << b << endl;
cout << sizeof(b) << endl;
cout << endl << "float" << endl;
float f = 10.123;
cout << f << endl;
cout << sizeof(f) << endl;
cout << endl << "double" << endl;
double d = 10.234;
cout << d << endl;
cout << sizeof(d) << endl;
cout << endl << "long double" << endl;
long double ld = 1234567890.1234567890;
cout << ld << endl;
cout << sizeof(ld) << endl;
system("PAUSE");
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -