void * memset ( void * ptr, int value, size_t num );
Fill block of memorySets the first num bytes of the block of memory pointed by ptr to the specified value (interpreted as an unsigned char).
int puts ( const char * str );
C string to be printed and appended with a newline character ('\n').
/* memset example */
#include <stdio.h>
#include <string.h>
/*例1*/
int main ()
{
char str[] = "almost every programmer should know memset!";
memset (str,'-',6); //------ every programmer should know memset!
puts (str);
return 0;
}
/*例2*/
int f[9][256],a[9];
memset(f,128,sizeof(f));
memset(a,0,sizeof(a));
/*
for循环简便写法
*/
for(auto i:arr) m[i]++;
for(char c:s) c1[c-'a']++;
for(char c:t) c2[c-'a']++;