C PROGRAM EXAMPLE FOR PALINDROME:
What is palindrome?
- When a number or word or a phrase or a sequence of characters which resembles the same while reading them from backward are called palindrome.
- Palindrome examples: 2882, madam, noon, level.
- The above examples resemble as same while reading them from backward also. If you read number “2882” from backward, it is same as “2882”. If you read the word “madam” from backward, it is same as “madam”
EXAMPLE C PROGRAM TO CHECK A NUMBER WHETHER IT IS PALINDROME OR NOT:
OUTPUT OF C PROGRAM FOR PALINDROME:
Please enter a number to check Palindrome : 656
Entered number: 656 Reversed number: 656 Entered number 656 is a palindrome |
EXAMPLE C PROGRAM TO CHECK A WORD WHETHER IT IS PALINDROME OR NOT:
OUTPUT OF C PROGRAM FOR PALINDROME:
Please enter a word to check Palindrome : madam
Entered word: madam Entered word “madam” is a palindrome |
0 comments:
Post a Comment