Check Wheter the Input String is Palindrome or Not


  • #include <stdio.h>
    #include <string.h>
     
    int main()
    {
       char a[100], b[100];
     
       printf("Enter the string to check if it is a palindrome\n");
       gets(a);
     
       strcpy(b,a);
       strrev(b);
     
       if( strcmp(a,b) == 0 )
          printf("Entered string is a palindrome.\n");
       else
          printf("Entered string is not a palindrome.\n");
     
       return 0;
    }
  • 2 Comments sorted by
  • Hello Qumber

    Can u please tell me what is palindrome number

  • MOM
    DAD


    all that string which read from backword or forward give same meanings and same sound are called Palindrome.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

    Optimum Creative