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++ 3.0r4 - <b>memset</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
memset

Usage

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

   ANSI

Description

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

Example 

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


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

   int main()
   {
       printf("buffer before memset: %s",buffer);
       memset(buffer,'z',8);
       printf("buffer after memset: %s",buffer);
       return EXIT_SUCCESS;
   }

Return Value

   memset returns buf.

See Also

   mem..., strcmp, strcat, strset, strchr




See Also: memchr memcmp memmove memset strcmp strcat strset strchr

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