Reverse in place · Undur di tempat
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.
Balik secara in-place
Balik sebuah string C secara in-place — ubah karakter dalam array yang sama alih-alih membangun string baru. Gerakan klasik: indeks kiri di awal dan indeks kanan di akhir, tukar mereka, lalu langkahkan keduanya menuju tengah hingga bertemu.
Complete void reverse_in_place(char *s) to reverse the C-string s in place (modify the same array). Do not write main. · Selesaikan void reverse_in_place(char *s) untuk undurkan C-string s di tempat (modifikasi array yang sama). Jangan tulis main.
Click Run to see the output here. · Klik Jalankan untuk melihat output di sini.