Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>memset() initialize buffer</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 memset()                Initialize Buffer

 #include   <memory.h>                   Required for declarations only
 #include   <string.h>                   Use either string.h or memory.h

 void       *memset(dest,ch,cnt);
 void       *dest;                       Pointer to destination
 int        ch;                          Character to set
 size_t cnt;                             Number of characters

    memset() starts at the beginning of the buffer 'dest' and sets 'cnt'
    bytes to the character 'ch'.

    Returns:    A pointer to the beginning of 'dest'.

   -------------------------------- Example ---------------------------------

    The following statement initializes the buffer 'buff' to NULL.

           #include <memory.h>

           char buff[128];

           main()
           {
               memset(char,'\0',128);
           }


See Also: memccpy() memchr() memcmp() memcpy()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson