|
This is the
simple implementation of the "Copy" function of the computer
world. This program copies the content of one string to another.
Logic :
The program asks the user to input the
string to copy and stores this as str1. The inner function "stcpy" takes 2
strings as arguments. By keeping the length as the reference, it traces till EOL
, for each i of this iteration, it copies the i-th letter to the
destination string, i.e str2.
After the EOL, it puts a NULL
to the second line. That gives the duplicated string of the entered. |