C++每日一问:基本数据类型的范围和精度 |
|
www.nanhushi.com 佚名 不详 |
Q:各种基本数据类型的范围和精度如何? A:Type Name Bytes Other Names Range of Values int * signed (int) System dependent char 1 signed char -128 to 127 long 4 (signed) long int -2,147,483,648 to 2,147,483,647 float 4 none 3.4E +/- 38 (7 digits) double 8 none 1.7E +/- 308 (15 digits) long double 10 none 1.2E +/- 4932 (19 digits) //资料来源:MSDN Oct2001,但是实际测试有些并不符合
|
|
|
文章录入:杜斌 责任编辑:杜斌 |
|
上一篇文章: C++每日一问:字符串与各种数字类型互转 下一篇文章: C++每日一问:如何获取时间?精度如何? |
【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |
|
|