Fill buffer with specified character: how to use memset : Memory Set « Memory « C / ANSI-C






Fill buffer with specified character: how to use memset


#include <stdio.h>
#include <string.h>

int main ()
{
  char str[] = "memset is memset.";

  puts (str);

  memset (str,'-',6);

  puts (str);
  return 0;
}


           
       








Related examples in the same category

1.Memory set