Computer Science, asked by khushi8188, 8 months ago

WAP to input 20 words and check whether they are palindrome word or not. Also count and print number of palindrome words​

Answers

Answered by sk788522
0

Answer:

countPalin() function counts the number of palindrome words by extracting every word of the string and passing it to checkPalin() function. An extra space is added in the original string to extract last word.

checkPalin() function check the word palindrome. It returns 1 if word is palindrome else returns 0. It makes sure that empty strings are not counted as palindrome as the user may enter more than one spaces in between or at the beginning of the string.

Similar questions