This seems to be a great place. My question is, what value (or how many bytes) am I moving in this implementaion of memmove()?
int main ()
{
char str[] = "memmove can be very useful......";
memmove (str+15,str+20,/*?*/);
puts (str);
return 0;
}
In the next example it says I am moving 11 bytes. But what makes it 11 bytes? Could somebody explain?
int main ()
{
char str[] = "memmove can be very useful......";
memmove (str+20,str+15,11); //source and destination are reversed
puts (str);
return 0;
}
Thanks!
Edit: BTW, the string length is 33 including the terminating null character.
The final argument to memmove() is the number of bytes to move - in this case 11