#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

void my_memset(void *str, char n, size_t count)
{
    char *dest = (char *)str;
    size_t i = 0;
    for (i = 0; i < count; i++)
    {
        *(dest + i) = n;
    }
}

int main()
{
    int arr[] = { 1, 2, 3, 4, 5, 6 };
    my_memset(arr, 0, 16);
    int i = 0;
    for (; i < 6; i++)
    {
        printf("%d ", arr[i]);
    }
    system("pause");
    return 0;
}

wKiom1ZRg7qyf3xEAABcnsOA444595.png