#include "stdio.h"
# include "string.h"
# include "malloc.h"
int main ()
{
char str[] = "Here you can learn memset function";
// memset(pointer,char,no.of byte);
//First 12 bytes replaced by char. here '-'
memset (str,'-',12);
puts (str);
return 0;
}
OUTPUT:
------------ learn memset function
Press any key to continue . . .
No comments:
Post a Comment