Explore
ProGrad Programs
Placement Prep
TCS Codevita
Live Placement Training
Webinars
About Us

Edit
Reply




Edit

Check whether a string is PALINDROME or Not | FACE Prep

Published on 11 Mar 2020

Program to check whether the given string is a palindrome or not is discussed here. A string is said to be a palindrome if the original string and the reverse of the string are the same.

palindrome or not string

Algorithm to check whether a string is a palindrome or not


  • Input the string.
  • Find the reverse of the string.
  • If the reverse of the string is equal to the input string, then return true. Else, return false.


Program to check whether the given string is a palindrome or not


C
C++
Java
Python 3

Output
Input - Enter the string : madam Output - The string is a palindrome


Recommended Programs







If you have any feedback about this article and want to improve this, please write to enquiry@faceprep.in