by Dinesh Thakur Category: C Programming (Pratical)

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.
Problem Statement:
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:

  1. The Entered String Must Be checked out.
  2. 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. 

void main() 
      char a[10],b[10];
      printf("Enter any String : ");
                printf("\nString is Palindrome");
                printf("\nNot Palindrome");

Check the String is Palindrome or Not


Related Articles on C Programming

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Search Content