Skip to content

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.

Log in or create account

IGCSE & A-Level