output expression is not correct
code :
#include <stdio.h>
#include <string.h>
int main() {
char a[40],b[40];
printf("character input: "); fgets(a, sizeof(a), stdin);
strcpy(b, a);
strrev(a);
printf("%s\n", a);
printf("%s", b);
if (b == a) printf("palindrome");
else printf("not palindrome");
}
character input:
seles
output:
seles
seles
not palindrome