← 返回列表

C库函数 memset()

C库函数 memset() #include <stdio.h> #include <string.h> int main () { char str[50]; strcpy(str,"This is string.h library function"); puts(str); memset(str,'$',7); puts(str); return(0); }

C库函数 memset()

#include <stdio.h>

#include <string.h>



int main () {

   char str[50];



   strcpy(str,"This is string.h library function");

   puts(str);



   memset(str,'$',7);

   puts(str);



   return(0);

}

打开资源 ↗

交流与评论