各种数据类型取值范围
通过代码测试:
/* coder: ACboy date: 2010-3-1 */ #include <iostream> #include <float.h> using namespace std; int main() { cout << "int 类型能存储的最大值和最小值" << endl; cout << "INT_MAX = " << INT_MAX << endl; cout << "INT_MIN = " << INT_MIN << endl; cout << "long 类型能存储的最大值和最小值" << endl; cout << "LONG_MAX = " << LONG_MAX << endl; cout << "LONG_MIN = " << LONG_MIN << endl; cout << "long long 类型能存储的最大值和最小值" << endl; cout << "LONG_LONG_MAX = " << LONG_LONG_MAX << endl; cout << "LONG_LONG_MIN = " << LONG_LONG_MIN << endl; cout << "float 类型能存储的最大值和最小值" << endl; cout << "FLT_MAX = " << FLT_MAX << endl; cout << "FLT_MIN = " << FLT_MIN << endl; cout << "double 类型能存储的最大值和最小值" << endl; cout << "DBL_MAX = " << DBL_MAX << endl; cout << "DBL_MIN = " << DBL_MIN << endl; return 0; }
态度决定高度,细节决定成败,