Palindrome · عكسي
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. · اضغط تشغيل لرؤية المخرجات هنا.