First time here? Checkout the FAQ!
x
menu search
brightness_auto
more_vert

Write a program to check whether a word is palindrome or not..

thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike

1 Answer

more_vert
 
verified
Best answer
    #include<stdio.h>
    #include<conio.h>
    #include<string.h>
    int main(){
        char str[20];
        int i, len, temp=0;
        int flag = 0;
        printf("Enter a string:");
        scanf("%s", str);
        len = strlen(str);
        for(i=0;i < len ;i++){
            if(str[i] != str[len-i-1]){
                temp = 1;
            break;
       }
    }

if(temp==0)
printf("\n Given string is palindrome");
else 
printf("\n Not palindrome");
}
thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike
more_vert
Code is not complete
more_vert
yeah edit done thanks for the info !

 ide code
https://onlinegdb.com/HB7BopLO5
...