C programming examples with output
Copy String
Program
#include<stdio.h>
#include<string.h>
main()
{
char source[]="C programming";
char destination[50];
strcpy(destination,source);
printf("Source string: %s\n",source);
printf("Destination string: %s\n",destination);
return 0;
}
Output:
Source string: C programming
Destination string: C programming
Copy String
Program
#include<stdio.h>
#include<string.h>
main()
{
char source[]="C programming";
char destination[50];
strcpy(destination,source);
printf("Source string: %s\n",source);
printf("Destination string: %s\n",destination);
return 0;
}
Output:
Source string: C programming
Destination string: C programming
0 komentar:
Post a Comment