progs/app5.c
author Christian Urban <urbanc@in.tum.de>
Tue, 26 Sep 2017 13:22:24 +0100
changeset 539 48e0c8b03ae5
parent 93 82ac034dcc9d
permissions -rw-r--r--
spell
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
}