1 2 3 4 5 6 7
#include <stddef.h> void memset(void *s, int c, size_t n) { for(unsigned char *sb = s; n; n--) *(sb++) = c; }