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

Usage

   #include <string.h>
   char *strcpy(char *string1,const char *string2);

   ANSI

Description

   strcpy copies string2 into the object pointed to by string1 including the
   terminating null  \0'. It returns string1.

Example 

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

   char string1[50] = " 1 Example string ";
   char buffer[50] = " Rubbish - string ";

   int main()
   {

       printf("\nstrcpy example [%s]\n",
               strcpy(buffer,string1));
       return EXIT_SUCCESS;
   }

Return Value

   Returns the new string pointed to by string1.





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