honor restored
This commit is contained in:
22
memset.c
Normal file
22
memset.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "main.h"
|
||||
|
||||
/**
|
||||
* _memset - sets values of bytes to specific value
|
||||
*
|
||||
* @adr: head address
|
||||
* @bval: number of bytes
|
||||
*
|
||||
* Return: pointer to place
|
||||
*/
|
||||
|
||||
char *_memset(char *adr, int bval)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < _strlen(adr); i++)
|
||||
{
|
||||
*(adr + i) = bval;
|
||||
}
|
||||
|
||||
return (adr);
|
||||
}
|
||||
Reference in New Issue
Block a user