#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
char *my_strncmp(const char *dst, const char *src, size_t count)
{
assert(NULL != dst&&NULL != src);
int ret = 0;
while (count--&&!(ret = ((unsigned int)*dst - (unsigned int)*src)) && *src != '\0')
{
dst++;
src++;
}
return ret;
}

int main()
{
char cs[30] = "asdfg";
char ct[10] = "asddg";
printf("%d", my_strncmp(cs, ct, 4));
system("pause");
return 0;
}