Difference between revisions of "C"

From Wiki2
(Created page with "<syntaxhighlight> char* str = "Hello"; char dest[12]; strcpy( dest, str ); strcat( dest, ".txt" ); </syntaxhighlight>")
 
Line 6: Line 6:
strcat( dest, ".txt" );
strcat( dest, ".txt" );
</syntaxhighlight>
</syntaxhighlight>
===[http://www.cs.bu.edu/teaching/cpp/string/array-vs-ptr/ arrray vs pointer]===

Revision as of 11:35, 21 February 2013

<syntaxhighlight> char* str = "Hello"; char dest[12];

strcpy( dest, str ); strcat( dest, ".txt" ); </syntaxhighlight>

arrray vs pointer