Table of Contents
Previous Section Next Section

memset

#include <string.h>void *memset(void *buf, int ch, size_t count);

The memset( ) function copies the low-order byte of ch into the first count characters of the array pointed to by buf. It returns buf.

The most common use of memset( ) is to initialize a region of memory to some known value.

Related functions are memcmp( ), memcpy( ), and memmove( ).


Table of Contents
Previous Section Next Section