How memset Function of C Works
void memset(void *first_byte_address, int value, int size)
{
int i;
char *cp = (char *)first_byte_address;
for(i = 0; i < size; i++)
{
*cp = value;
cp++;
}
}
// this is not the exact memset function of C, it is just a guess of this blog author
{
int i;
char *cp = (char *)first_byte_address;
for(i = 0; i < size; i++)
{
*cp = value;
cp++;
}
}
// this is not the exact memset function of C, it is just a guess of this blog author
Comments
Post a Comment