memset, _fmemset

set the first part of an object to a given value

Synopsis:

#include <string.h>
void *memset( void *dst,
              int c,
              size_t length );
void __far *_fmemset( void __far *dst,
                      int c,
                      size_t length );

Description:

The memset() and _fmemset() functions fill the first length characters of the object pointed to by dst with the value c.

The _fmemset() function is a data-model-independent form of the memset() function. It accepts far pointer arguments, and returns a far pointer. It is most useful in mixed memory model applications.

Returns:

a pointer to the destination buffer (that is, the value of dst)

See also:

memchr(), memcmp(), memcpy(), memmove()

Examples:

#include <string.h>

void main()
  {
    char buffer[80];

    memset( buffer, '=', 80 );
  }

Classification:

memset() is ANSI; _fmemset() is WATCOM.

Systems:

memset()
All (except DOS/PM)
_fmemset()
All (except Netware, DOS/PM)