4. mem... functions

The mem... functions are meant for manipulating objects as character arrays.

The intent is an interface to efficient routines which can be implemented using low-level machine instructions.

The pointer arguments are `void *' so they can accept any pointer type.

However, you can not use a void pointer to point to anything.

Therefore, these functions must use local `char *' variables initialized with their `void *' arguments, e.g.

int     memcmp  (const void *v1, const void *v2, size_t size)
{
        const unsigned char *p1 = v1;
        const unsigned char *p2 = v2;

        ... use p1 and p2 to access the elements of v1 and v2 ...
}

memchr

memset

memcmp

memcpy

memmove