c program for palindrome normal 0 false


C Program for Palindrome

void main()

{

          char ch[30];

          char ch1[30];

          int i,j,l;

          clrscr();

          printf("ENTER THE STRING: ");

          gets(ch);

          l=strlen(ch);

          j=0;

          for(i=l-1;i>=0;i--,j++)

                   ch1[j]=ch[i];

                   ch1[j]='\0';

                   if(strcmp(ch,ch1)==0)

                             printf("IT IS A PALINDROME");

                   else

                             printf("IT IS NOT A PALINDROME");

          getch();

}

 


 

OUTPUT :

 

ENTER THE STRING: MALAYALAM

 IT IS A PALINDROME


 

 

 

 


 

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: c program for palindrome normal 0 false
Reference No:- TGS0159302

Expected delivery within 24 Hours