strcpy1 C 언어 strcpy strncpy 함수 C 언어는 문자열을 다루는 데에 많은 함수를 제공합니다. 그 중 strcpy와 strncpy 함수는 문자열을 복사하는 데에 사용되는 함수입니다. strcpy와 strncpy 함수의 사용 방법과 예제에 대해 알아보겠습니다. strcpy 함수 strcpy 함수는 문자열을 한 곳에서 다른 곳으로 복사하는 함수입니다. 다음은 strcpy 함수의 사용 예제입니다. #include #include int main() { char source[] = "Hello, world!"; char destination[20]; strcpy(destination, source); printf("복사된 문자열: %s\n", destination); return 0; } 위의 예제에서 strcpy 함수는 source 배열에 저장된.. 2023. 7. 17. 이전 1 다음