





0
Notifications Mark All Read
No New notification
- Login
- Get Prime
C++ Program to Check Whether Given String is a Palindrome
ask user to add his code in comments below.
Notifications Mark All Read
No New notification
ask user to add his code in comments below.
#include
#include
using namespace std;
int main()
{
char str1[20], str2[20];
int i, j, len = 0, flag = 0;
cout <= 0 ; i–, j++)
str2[j] = str1[i];
if (strcmp(str1, str2))
flag = 1;
if (flag == 1)
cout << str1 << " is not a palindrome";
else
cout << str1 << " is a palindrome";
return 0;
}