void* memset (void *s, int ch, size_t n);
Sets the contents of the first n bytes of a piece of memory pointed by S to the ASCII value specified by Ch.
For example: memset (lpmystruct, 0, sizeof (mystruct)), initialize struct.
void *memcpy (void *dest, const void *SRC, size_t n);
Copies n bytes from the starting position of the memory address referred to by the source SRC to the starting position of the memory address referred to by the target dest.
Note: If n is greater than the memory size pointed to by dest, it will cause memory overflow.
strcpy (void *dest, const void *SRC); The string is copied, and the end of '/' is encountered, and the latter is longer than the former and can cause memory overflow.
int memcmp (const void *BUF1, const void *BUF2, unsigned int count);
Compares the memory area BUF1 and the first count bytes of buf2.
Description: Some reference in Baidu Encyclopedia.
MEMSET,MEMCPY,MEMCMP usage