memset - initialize region of memory
Standard C Library (libc, -lc)
memset(void *buf, int chr, size_t len);
The memory region pointed to by buf, of length len, is initialized by setting each location of it to chr (converted to unsigned char).
Beware of writing
memset(buf, len, 0);(which does nothing at all) when you meant
memset(buf, 0, len);instead.
memset returns buf.