Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - memset http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                                  memset

   #include <string.h>
   void *memset(void *buf, int val,size_t count);
   Usage

   Description
   memset sets the first count characters pointed to by buf to the  value
   specified by val. It returns buf.

   Return Value
   memset returns buf.

   Example
   #include <string.h>
   #include <stdio.h>

   char buffer[20] = "Test string\n";

   main()
   {
        printf("buffer before memset: %s",buffer);
        result = memset(buffer,'z',8);
        printf("buffer after memset: %s",buffer);
   }


See Also: strcmp strcat strset strchr

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