当使用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
该问题主要自身对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。