#include<stdio.h>
main()
{
char a[20],b[20];
printf("enter a string");
scanf("%s",&a);
strcpy(b,a);//copies string a to b
strrev(b);//reverses string b
if(strcmp(a,b)==0)//compares if the original and reverse strings are same
printf("\n%s is a palindrome",a);
else
printf("\n%s is not a palindrome",a);
return 0;
}
Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.
The palidrome for the name of a woman in the Old Testament is "Hannah".
level
bob
toot
Ewe
12421
level
toot
peep
napopan
kook, boob