C library function memset()




C library function memset()

#include <stdio.h>
#include <stdlib.h>

int main () {
   char str[50];

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

   memset(str,'$',7);
   puts(str);
   
   return(0);
}

Output

This is string.h library function
$$$$$$$ string.h library function