Go to the first, previous, next, last section, table of contents.
#include <string.h> void *memset(void *buffer, int ch, size_t num);
This function stores num copies of ch, starting at buffer. This is often used to initialize objects to a known value, like zero.
Note that, although ch is declared int
in the prototype,
memset
only uses its least-significant byte to fill buffer.
buffer
ANSI, POSIX
struct tm t; memset(&t, 0, sizeof(t));
Go to the first, previous, next, last section, table of contents.