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
- test
- 웹기획자
- C
- 갤럭시폴드7성능
- convert
- 도커쿠버네티스
- log
- ethereum
- kotlin
- 개발자필독서
- Realm
- 해외여행데이터
- 2025it도서
- 기획자
- 안드로이드
- eSIM
- firebase
- 스트리밍
- 컴파일
- 데이터분석
- 갤럭시폴드7화질
- 갤럭시폴드7디스플레이
- Exception
- 기획자역량
- 다윈
- 앱기획자
- Glide
- Gradle
- error
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