bzero or memset |
Prototype: |
#include <string.h>
void bzero(void *mem, int bytes);
void* memset(void *mem, int val, int bytes);
|
General Description: |
Bzero() initializes the specified block to zeros. This call is deprecated, you may want to use memset() instead. Memset() sets the specified block to val. |
Return Value: |
Bzero() returns no value. Memset() returns the reference mem. |
Parameters |
mem |
The memory segment to initialize. |
val |
The value to fill the segment with. |
bytes |
The number of bytes to write (the size of the memory segment). |
Possible Errors |
(none)
|
|
Examples |
bzero(&addr, sizeof(addr));
|
memset(&addr, 0, sizeof(addr));
|