Copy a String
February 17, 2012
/*
Write a program in C for copy a string
*/
#include<stdio.h>
#include<string.h>
main()
{
char source[] = "C program";
char destination[50];
strcpy(destination, source);
printf("Source string: %s\n", source);
printf("Destination string: %s\n", destination);
return 0;
}
0 Comments