memset

Fills the first length characters of an object with a specified value (function or macro)

Local Servers:nonblocking
Remote Servers:N/A
Classification:ANSI
Service:Memory Manipulation

Syntax

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

Parameters

s
(IN) Points to the object.
c
(IN) Specifies the value of the character.
length
(IN) Specifies the number of characters to set.

Return Values

memset returns s.

Remarks

The memset function or macro fills the first length characters of the object pointed to by s with the value c.

See Also

memchr, memcmp, memcpy, memmove

Example

  #include <string.h>  
   
  main ()  
  {  
     char buffer[80];  
     memset (buffer, ’=’, 80);  
  }