Reverse in place · 제자리에서 뒤집기
Reverse in place
Reverse a C-string in place — change the characters in the same array rather than building a new string. The classic move: a left index at the start and a right index at the end, swap them, then step both toward the middle until they meet.
제자리 뒤집기
C 문자열을 제자리에서 뒤집습니다—새로운 문자열을 만들지 않고 동일한 배열 내의 문자를 변경합니다. 고전적인 방법: 시작점의 왼쪽 인덱스와 끝점의 오른쪽 인덱스를 설정하고, 서로交换한 뒤 양쪽을 중앙으로 향해 이동하여 만날 때까지 계속합니다.
Complete void reverse_in_place(char *s) to reverse the C-string s in place (modify the same array). Do not write main. · void reverse_in_place(char *s)를 완성하여 C-문자열 s을 제자리에서 뒤집으십시오(동일한 배열을 수정). main는 작성하지 마십시오.
Click Run to see the output here. · 출력을 보려면 '실행'을 클릭하세요.