| [ CnUnix ] in KIDS 글 쓴 이(By): guest (guest) <211.219.37.154> 날 짜 (Date): 2002년 9월 19일 목요일 오후 02시 53분 04초 제 목(Title): [C기초질문] -_-; 다음 코드의 문제점은??? 왜 test2() 함수에서는 "efgh"를 출력하는데 main에서는 쓰레기가 나올까요? char *str[]={"abcd", "efgh", "adfadfa", "adfadfa", NULL}; test2(char *tmp) { printf("%s\n",str[1]); tmp=str[1]; printf("%s\n",tmp); } int main() { char *tmp; test2(tmp); printf("%s\n", tmp); } |