아래의 코드는 문자열에서 양쪽 공백을 제거하는 trim() 함수를 구현한 것입니다. C언어 코드 #include #include #include void trim(char* str) { int start = 0, end = strlen(str) - 1; // 공백 제거 시작 위치 찾기 while (isspace(str[start])) { start++; } // 공백 제거 끝 위치 찾기 while (end > start && isspace(str[end])) { end--; } // 문자열 복사하여 공백 제거 for (int i = start; i