문자열 뒤집기 초간단 샘플..
/* reverse : reverse string input in place */ char* reverse(char* input) { int len,start,end; char* result; len=strlen(input); result=(char *)malloc(len+1); for(start=0, end=len-1; start<=len; start++, end--) *(result+start)=*(input+end); *(result+len)='\0'; return result; } int main() { char* result; result=reverse("12345"); printf("%s",result); getch(); free(result); return 0; }