Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- Android
- log
- 도커쿠버네티스
- 2025it도서
- 기획자역량
- C
- 웹기획자
- 기획자
- error
- 갤럭시폴드7디스플레이
- firebase
- 갤럭시폴드7성능
- 컴파일
- Glide
- eSIM
- Gradle
- Exception
- kotlin
- ethereum
- 앱기획자
- test
- 개발자필독서
- 다윈
- 스트리밍
- 해외여행데이터
- 갤럭시폴드7화질
- 데이터분석
- 안드로이드
- Realm
- convert
Archives
- Today
- Total
날마다 새롭게 또 날마다 새롭게
strcpy - 문자열 복사 함수 구현 코드 (문자열 배열, 포인터) 본문
/* strcpy : copy t to s; array subscript version */
void strcpy(char *s, char *t)
{
int i;
i=0;
while((s[i]=t[i]) != '\0')
i++;
}
/* strcpy : copy to s; pointer version 1 */
void strcpy(char *s, char *t)
{
while((*s=*t)!='\0') {
s++;
t++;
}
}
/* strcpy : copy to s; pointer version 2 */
void strcpy(char *s, char *t)
{
while((*s++ = *t++)!='\0')
;
}
/* strcpy : copy to s; pointer version 3 */
void strcpy(char *s, char *t)
{
while(*s++ = *t++)
;
}
Comments