Palindrome
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · このページには最新のブラウザ(SharedArrayBuffer対応)が必要です。Chrome、Edge、Firefox、Safariを最新バージョンに更新してください。
English
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.
日本語
パリンドローム判定
C文字列が両方向で同じであれば 1 を、そうでなければ 0 を返してください。Cではデフォルトで bool がないため、整数 1 と 0 を使用します。両端から中央に向かって文字を比較してください。
Complete int is_palindrome(const char *s) to return 1 if s reads the same forwards and backwards, otherwise 0.
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。