In this tutorial, we are going to write a C Program to find whether a string is a palindrome number or not in C Programming with practical program code and step-by-step full complete explanation.

C Program to find whether a string is a palindrome or not


C Program to find palindrome number.

 
#include<stdio.h>
#include<conio.h>

void main()
{
	char s1[20],s2[20];

	clrscr();

	printf("Enter a string: ");
	scanf("%s",s1);
	strcpy(s2,s1);
	strrev(s2);

	if(strcmp(s1,s2)==0)
	printf("String is a palindrome");
	else
	printf("Not a palindrome string");

	getch();
}


Output

 
Enter a string: abc
Not a palindrome string