Declaration:code
void *memset(void *
str, int
c, size_t
n);
Copies the character c (an unsigned char
) to the first n characters of the string pointed to by the argument str.string
The argument str is returned.io
说明: 第一个参数: 是被set 的目标地址数据类型
第二个参数是: 是要设置的字符:其长度只能是一个字节 即8位 0000 0000 -1111 1111 最小值为 1 最大值为 255数据
若是传入的参数大于255 也就是长度超过8 位,则其只取后8位语言
可使用十六进制做为参数 如 0x11 即 0001 0001 也就是 int 17poi
第三个参数: 是字节数,即须要设置几个字节co
这里须要掌握 c 语言类型中的经常使用数据类型的字节数 可使用 sizeof() 求得block