memset()函数原型是extern void *memset(void *buffer, int c, int count)
1.buffer是指针
2.c是替换后的字符
3.count 是替换的长度
作用:memset(str,’\0’,strlen(str)); 把str中所有字符替换为’\0’,达到清空数组的作用
memset用法
最新推荐文章于 2023-10-11 22:59:14 发布
memset()函数原型是extern void *memset(void *buffer, int c, int count)
1.buffer是指针
2.c是替换后的字符
3.count 是替换的长度
作用:memset(str,’\0’,strlen(str)); 把str中所有字符替换为’\0’,达到清空数组的作用