strcpy 구현 썸네일형 리스트형 [DGPD][C언어] 문자열 복사 함수 strcpy 만들기. 1234567891011121314151617181920212223242526#include char* mystrcpy(char* destination, const char* source){ while (*source != '\0') { *destination = *source; source++; destination++; } *destination = '\0'; return destination;} int main(){ char str1[] = "sample string"; char str2[40]; char str3[40]; mystrcpy(str2, str1); mystrcpy(str3, "copy successful"); printf("str1: %s\nstr2: %s\nstr3: %s\n", s.. 더보기 이전 1 다음