接口形式:
void * memset ( void * ptr, int value, size_t num );
例子:
/* memset example */ #include <stdio.h> #include <string.h> int main () { char str[] = "almost every programmer should know memset!"; memset (str,'-',6); puts (str); return 0; }
------ every programmer should know memset!
原文地址:http://blog.csdn.net/chenlei0630/article/details/41802497