Question: A word that reads the same backward as forward is called a palindrome , e . g . , mom, dad, racecar, madam, and Radar
A word that reads the same backward as forward is called apalindrome eg "mom", "dad", "racecar", "madam", and "Radar" caseinsensitive Write a program calledTestPalindromicWord that prompts user for a word and prints xxx isis not a palindrome".
Note:
Maintain two indexes,forwardIndexfIdx andbackwardIndexbIdx to scan the phrase forward and backward.
int fIdx bIdx strLen ;
while fIdx bIdx
fIdx;
bIdx;
or
for int fIdx bIdx strLen ; fIdx bIdx; fIdx, bIdx
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
