Memory Block Functions

Closely related to the string handling functions are those operating on memory blocks. Memory block functions operate on any block of memory, whether it is null-terminated or not. Give the length of the block as an additional parameter. Also, these functions work with void pointers instead of char pointers (refer the following listing).

Listing: ANSI-C Memory Block Functions
void * memcpy(void *to, const void *from, size_t size);
void * 
memmove(void *to, const void *from, size_t size);

int    memcmp(const void *p, const void *q, size_t size);

void * memchr(const void *adr, int byte, size_t size);

void * memset(void *adr, int byte, size_t size);