This is the reason they will always need the size of characters to operate on.
For example, when using memcpy it requires size as well, though, strcpy only needs dest and src pointers. It can automatically detect end of string using null character.
void *memcpy(void *dest, const void *src, size_t n);
char *strcpy(char *dest, const char *src);
No comments:
Post a Comment