Created
February 18, 2020 06:00
-
-
Save unknowntpo/ce429d33bec4e07342019c10490c19c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* copy t to s ; pointer version 2 */ | |
void strcpy(char *s, char *t) { | |
while (*s++ = *t++) | |
; | |
} | |
/* copy t to s ; pointer version 1 */ | |
void strcpy(char *s, char *t) { | |
while ((*s++ = *t++) != '\0') | |
; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment