C examples for String:String Function
Get the return from strcpy()
#include <stdio.h> #include <string.h> // declares strcpy() #define WORDS "test" #define SIZE 40//from w w w. j av a 2 s . co m int main(void) { const char * orig = WORDS; char copy[SIZE] = "this is a test."; char * ps; puts(orig); puts(copy); ps = strcpy(copy + 7, orig); puts(copy); puts(ps); return 0; }