char name[] = "lady gaga and barack obama";
char data[100];
memcpy(data, name, strlen(name)+1);
puts(data);2. memset
char name[] = "lady gaga";
memset(name, '*', 5);
puts(name);3. memmove
char name[] = "lady gaga and luna maya";
memmove(name+0, name+5, 4); // placed, starting, num
puts(name);
No comments:
Post a Comment