包含头文件:
#include <limits>
#include <float.h>
类型变量定义:
int a = 2;//32位整数 4字节 4byte 32bit
unsigned int b = 2u;//无符号32位整数 4字节 4byte 32bit
signed int b1 = -2147483648;//有符号32位整数 4字节 4byte 32bit
long c = 2l;//32位整数 4字节 4byte 32bit
unsigned long d= 2ul;//无符号32位整数 4字节 4byte 32bit
double e = 2.0;//双精度浮点数
float f = 2.0f;//单精度浮点数
long double g=2.0l;//长双精度浮点数
long long h=2ll;//超长整数 64位整数 8字节 8byte 64bit
short i = 2;//16位整数 2字节 2byte 16bit
unsigned short i1 = 2;//无符号16位整数 2字节 2byte 16bit
char j = '2';//字符类型 1字节 1byte 8bit
char j1 = '2';//无符号字符类型 1字节 1byte 8bit