void *memset(void *s, int c, size_t n);
相信大家对memset的形式已经很熟悉了,我只是记录一下 (c) 常用的取值而已...
int / long long / short
c的取值 |
int时实际取值 |
long long时实际取值 |
short时实际取值 |
备注 |
0x00 |
(0) |
(0) |
(0) |
|
0xff |
(-1) |
(-1) |
(-1) |
|
0x7f |
(2139062143) |
(9187201950435737471) |
(32639) |
极大值 |
0x3f |
(1061109567) |
(4557430888798830399) |
(16191) |
较大值 |
0xc0 |
(-1061109568) |
(-4557430888798830400) |
(-16192) |
较小值 |
0x80 |
(-2139062144) |
(-9187201950435737472) |
(-32640) |
极小值 |
float / double
c的取值 |
float时实际取值 |
double时实际取值 |
备注 |
0x00 |
(0) |
(0) |
|
0x7f |
(3.39615 imes10^{38}) |
(1.38242 imes10^{306}) |
极大值 |
0x6f |
(7.41016 imes10^{28}) |
(5.9575 imes10^{228}) |
较大值 |
0xee |
(-3.69731 imes10^{28}) |
(-2.28999 imes10^{226}) |
较小值 |
0xfe |
(-1.69474 imes10^{38}) |
(-5.31401 imes10^{303}) |
极小值 |
0x10 |
(2.36943 imes10^{-38}) |
(7.7486 imes10^{-304}) |
接近(0)的正的极小值 |
0x80 |
(-1.1801 imes10^{-38}) |
(-2.93745 imes10^{-306}) |
接近(0)的负的极大值 |
long double
c的取值 |
实际取值 |
备注 |
0x00 |
(0) |
|
0xdf |
(-4.4418 imes 10^{2456}) |
较小值 |
0xfe |
(-1.02344 imes 10^{4855}) |
极小值 |
0x80 |
(-5.74275 imes 10^{-4894}) |
接近(0)的负的极大值 |