progs/app5.c
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Wed, 02 Dec 2015 01:57:07 +0000
changeset 440 66f1d7e4f70b
parent 93 82ac034dcc9d
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
}