In this program, an array type variables with elements (10) created for which contain the data as required for them. These created variables are character (char) type data type. These variables will use to contain the string data that is been used for the checking condition as required for string functions. And in the End the data entered will be displayed on the screen.
In this program, some required string functions also used like “strcpy” for copying the strings. The other one is “strrev” that will use to reverse the string for palindrome condition. And “strcmp” also been used for comparing the string with each other after reversing if that strings got matched then it will be palindrome else not.
The two strings will be use to check for palindrome situation with the use of String reverse function and control statement for checking both the strings. Write a program to read the data and determine the following:
- The Entered String Must Be checked out.
- If-else condition also is come into use checking both string.
Here is source code of the C Program Write a Program to Check the String is Palindrome or Not . The C program is successfully compiled. The program output is also shown below.
printf("Enter any String : ");
printf("\nString is Palindrome");
Related Articles on C Programming