Check String is Palindrome C Program

By | August 27, 2016

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.

2 thoughts on “Check String is Palindrome C Program

  1. Vishal Mehta

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

    Reply
  2. Devraj Royy

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

    Reply

Let's Discuss