Computer Science, asked by raunit9324, 1 year ago

Write a c program that reads a string of characters and prints whether or not the entire string is palindrome.your program should ignore all blanks, numbers, punctuation and special characters and should be case sensitive

Answers

Answered by varshneysamyakoxg8tj
1
void main()
{

char A[20],B[20],C[20];
int i,k=0;
gets(A);

for(i=0;i<strlen(A);i++)
{
if(!isalnum(A[i]))
{
B[k++]=A[i];
}


}
B[k]='\0';

strcpy(C,B);
strrev(C);
if(strcmp(C,B)==0)
printf("Palindrome");
else
printf("not palindrome");
return 0;

}
Similar questions