Function to copy a string using pointers.
void copy_string(char *target, char *source) { while (*source) { *target = *source; source++; target++; } *target = '\0'; }
Output of the program:
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Output of the program:
Input a string to copy
My programming skills are improving.
After copying, the string: My programming skills are improving.