Skip to content · ⁨Saltar al contenido⁩

Reverse in place · ⁨Invertir in situ⁩

English

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.

Español

Invertir in situ

Invierta una cadena C in situ — cambie los caracteres en el mismo array en lugar de construir una nueva cadena. El enfoque clásico: un índice izquierdo al inicio y un índice derecho al final, intercámbielos, y luego avancen ambos hacia el centro hasta que se encuentren.

Log in or create account · ⁨Iniciar sesión o crear cuenta⁩

IGCSE, A-Level & AP