setmem
raw OCR
Assigns a value to a range of memory.
Defined in header <mem.h>
Syntax
#include <mem.h>
void setmem(void *dest, unsigned length, char value);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ |
Remarks
setmem sets a block of length bytes, pointed to by dest, to the byte value.
Return value
None.
See also
Example
Ifinclude <stdio.h>
#include <alloc.h>
#include <niem.h>
int main (void)
t
char *dest;
dest = (char *) calloc(21, sizeof(char) );
setmem (dest, 20, 'c');
printf ("%s\n", dest);
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/mem.h/setmem/
· short form /3.1/setmem/