Computer/초보자를 위한 C 언어 300제
057. 문자열 복사하기(strcpy)
Theo Kim
2011. 1. 30. 17:47
#include <stdio.h> #include <string.h> #define KOREA "대한민국" void main( void ) { char *string1; char string2[100]; strcpy( string1, KOREA ); // 실행 시 에러 발생 strcpy( string2, KOREA ); strcpy( string2, "봄" ); }