Check String is Palindrome C Program

C Program To Check if String is Palindrome or Not

Learn How To Check if a String is Palindrome or Not in C Programming. This C Program To check whether the given string is palindrome makes use of While Loop and For Loop.

What is a Palindromic String?

A string is said to be a palindromic string if it is identical to the original string after the String has been reversed. This code makes use of two string functions viz., strrev(), strlen() and strcmp(). Initially, the string is reversed and then compared with the original string if it is palindrome or not.

Example

madam

Must Read: C Program To Reverse A String without using Functions


C Program To Check if String is Palindrome or Not using String Functions

Must Read: C Program To Arrange Names in Alphabetical Order

Output

C Program To Check if String is Palindrome or Not using Functions strlen, strrev, strcmp

If you have any compilation errors or doubts in this C Program to Check if a given String is Palindromic or Not, let us know about it in the Comment Section below.


Tushar Soni

I am Tushar Soni, Co - Founder of CodingAlpha. I am a computer science student from India and passionate about Web Development and Programming. Connect with me on Facebook | LinkedIn | Google Plus

2 thoughts on “Check String is Palindrome C Program

  • August 28, 2016 at 5:34 pm
    Permalink

    Is it necessary to use strlen method? Can we not directly loop till the limit of the array?

    Reply
  • September 13, 2016 at 11:10 am
    Permalink

    What does the strcmp function do there? Is it important to use strlen() function to find palindromic string?

    Reply

Join The Discussion