首先要知道memset函數是對字節為單位進行賦值的; void *memset(void *s, int ch, size_t n); 函數解釋:將s中前n個字節 (typedef unsigned int size_t )用 ch 替換並返回 s 。 其實這裏面的ch就是ascii為ch的字符;