Mega Code Archive

 
Categories / C / Memory
 

Fill buffer with specified character

#include <stdio.h> #include <string.h> int main () {   char str[] = "memset is memset.";   puts (str);   memset (str,'-',6);   puts (str);   return 0; }