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
- convert
- ethereum
- eSIM
- 해외여행데이터
- 패스명의도용방지
- C
- 스트리밍
- 유심보호서비스설정
- kotlin
- error
- log
- 유심해킹예방
- 유심보호설정
- Exception
- pass명의도용방지
- 컴파일
- msafer명의도용방지서비스
- Realm
- t월드보안설정
- Gradle
- pass명의도용방지서비스
- skt유심보호서비스
- pass앱명의도용방지
- firebase
- 다윈
- 금값시장
- Glide
- Android
- 안드로이드
- test
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