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. · اضغط تشغيل لرؤية المخرجات هنا.