author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Sat, 04 Oct 2014 15:16:32 +0100 | |
changeset 201 | f7a9837a63b8 |
parent 93 | 82ac034dcc9d |
permissions | -rw-r--r-- |
93
82ac034dcc9d
brought order into the repository
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
1 |
void strcpy(char *src, char *dst) { |
82ac034dcc9d
brought order into the repository
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
2 |
int i = 0; |
82ac034dcc9d
brought order into the repository
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
3 |
while (src[i] != "\0") { |
82ac034dcc9d
brought order into the repository
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
4 |
dst[i] = src[i]; |
82ac034dcc9d
brought order into the repository
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
5 |
i = i + 1; |
82ac034dcc9d
brought order into the repository
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
6 |
} |
82ac034dcc9d
brought order into the repository
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff
changeset
|
7 |
} |