当使用memset的时候,初始化的数据如下:134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 134744072 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 回答
千巷猫影
TA贡献1829条经验 获得超7个赞
该问题主要自身对memset的理解不够透彻。
NAME memset - fill memory with a constant byte SYNOPSIS #include <string.h> void *memset(void *s, int c, size_t n); DESCRIPTION The memset() function fills the first n bytes of the memory area pointed to by s with the constant byte c.
code中alphabet定义的是int而非char,它只是初始化前n byte,而不是4*n byte。
- 1 回答
- 0 关注
- 189 浏览
添加回答
举报
0/150
提交
取消