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.
עברית
פליندרום
החזר 1 אם מחרוזת C קוראת אותו דבר בשני הכיוונים, אחרת 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. · השלם את int is_palindrome(const char *s) כדי להחזיר 1 אם s קורא זהה קדימה ואחורה, אחרת החזר 0.
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.