Palindrome · Palíndromo
Palindrome
Return 1 if a C-string reads the same in both directions, otherwise 0 — in C there's no bool by default, so we use the integers 1 and 0. Compare characters from the two ends moving inward.
Palíndromo
Devuelve 1 si una cadena C se lee igual en ambos sentidos, de lo contrario 0 — en C no hay un tipo bool por defecto, por lo que utilizamos los enteros 1 y 0. Compara los caracteres desde los extremos moviéndose hacia el interior.
Complete int is_palindrome(const char *s) to return 1 if s reads the same forwards and backwards, otherwise 0. · Complete int is_palindrome(const char *s) para devolver 1 si s se lee igual de adelante hacia atrás y de atrás hacia adelante, de lo contrario 0.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.