User Tools

Site Tools


c:string.h:strcpy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

c:string.h:strcpy [2014/04/05 05:02]
188.113.222.212
c:string.h:strcpy [2014/04/05 05:04] (current)
188.113.222.212
Line 19: Line 19:
 #include <string.h> #include <string.h>
    
-int main( void ) { +int main( void )  
-  +{ 
-char string[] = "copy me"; /* the size of the array is calculated automatically */ +  char string[] = "copy me"; /* the size of the array is calculated automatically */ 
-char string2[20];+  char string2[20];
  
    
-if( strcpy(string2, string) != 0 ) +  if( strcpy(string2, string) != 0 ) 
-  printf( "copy success: %s\n",  string2 ); +    printf( "copy success: %s\n",  string2 ); 
-else +  else 
-  printf( "copy failure\n" ); +    printf( "copy failure\n" ); 
-return 0;+  return 0;
 } }
 </code> </code>
advertising
c/string.h/strcpy.txt · Last modified: 2014/04/05 05:04 by 188.113.222.212

Impressum Datenschutz