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
- strcpy
- strcat
- group by
- SQL
- web-proxy lab
- BSD소켓
- HTTP
- TCP
- 정글#정글사관학교#3기#내일#기대#설렘#희망#노력
- mysql
- Error Code: 1055
- https://firecatlibrary.tistory.com/49?category=874970
- https://coding-factory.tistory.com/641
- ip
- C언어
- DNS
Archives
- Today
- Total
매일을 설렘으로
[C언어] strcpy/strcat 함수 익히기 본문
strcpy/strcat 함수
- strcpy(char* dest, const char* src) : dest에 src를 한자한자 덮어쓰기한다.
- strcat(char* dest, const char* src) : dest 뒤에 src를 붙인다.
코드 확인
#include <stdio.h>
#include <string.h>
int main(void)
{
char arr1[100];
char arr2[100];
char arr3[100];
// arr1 선언
strcpy(arr1, "hello, i am array");
printf("%s\n", arr1);
// arr2 선언
strcpy(arr2, "This is following text");
printf("%s\n", arr2);
// arr1 = arr1 + arr2
strcat(arr1, arr2);
printf("%s\n", arr1);
}
//////////결과값//////////////
hello, i am array
This is following text
hello, i am arrayThis is following text