#include <stdio.h> #include <stdbool.h> #include <string.h>
bool is_palindrome(char* str) { int length = strlen(str);
for (int i = 0, j = length - 1; i < j; i++, j--) {
if (str[i] != str[j]) {
return false;
}
}
return true;
}
int main()
{ char str[] = "level";
if
标签:判断,return,int,char,length,str,字符串,include,回文
From: https://blog.51cto.com/u_16271069/8261737