progs/app5.c
author Christian Urban <urbanc@in.tum.de>
Fri, 01 Jun 2018 15:46:34 +0100
changeset 564 3391a4fc3533
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
}