#include <stdio.h>
int main()
{
int c = 0;
char s[1000], d[1000] = "What can I say about my programming skills?";
printf("Before copying, the string: %s\n", d);
printf("Input a string to copy\n");
gets(s);
while (s[c] != '\0') {
d[c] = s[c];
c++;
}
d[c] = '\0';
printf("After copying, the string: %s\n", d);
return 0;
}
Output of the program:
Before copying, the string: What can I say about my programming skills? Input a string to copy My programming skills are improving. After copying, the string: My programming skills are improving.
Output of the program:
Input a string to copy
My programming skills are improving.
After copying, the string: My programming skills are improving.