C examples for String:String Function
Strcpy() function copies the contents of one string into another string.
#include <stdio.h> #include <string.h> int main()// ww w .ja va 2s. co m { char str1[11]; char *str2 = "C Language"; printf("\nString 1 now contains %s\n", strcpy(str1, str2)); }