當(dāng)使用memset的時(shí)候,初始化的數(shù)據(jù)如下: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貢獻(xiàn)1829條經(jīng)驗(yàn) 獲得超7個(gè)贊
該問(wèn)題主要自身對(duì)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 關(guān)注
- 239 瀏覽
添加回答
舉報(bào)
0/150
提交
取消