All pastes #2103090 Raw Edit

Miscellany

public text v1 · immutable
#2103090 ·published 2012-01-15 02:47 UTC
rendered paste body
void copy(char to[], char from[])
{
        printf ("to[]: %s\nfrom[]: %s\n", to, from);

        int i = 0;

        while (from[i] != '\0') {
                printf ("from[%d]: %c\n", i, from[i]);
                printf ("to[%d]: %c\n", i, to[i]);
                to[i] = from[i];
                printf ("to[%d] now: %c\n", i, to[i]);
                i++;
        }

        to[i] = '\0';
}