A palindrome is a word or a number or a sequence of units that is able to be rea
ID: 3846364 • Letter: A
Question
A palindrome is a word or a number or a sequence of units that is able to be read the same way from either direction, be it forwards or backwards, Punctuation and spaces between the words or lettering is allowed. Here are some examples: Red rum sir is murder Step on no pets Eva can I see bees in a cave No lemon no melon write a program that does following string control and manipulation operations by using pointers: Prompt the user to enter two string, count numbers of characters in the strings. Point length of the strings, print if the given string are palindrome. Use main as the driver function. Allow the user to run the program as many times as desired. Write 6 functions that main () calls to accomplish the task: getstrings (): Prompts the user for two strings. Use pointer variables getlength (): Determines the lengths of each starian, returns length of the given string. Is Palindrome(): Determines a given string is palindrome or not. Return true if palindrome or retums false otherwise. Disolay reverse (): Prints given string in reverse. Concat (): displays given two strains concatenation. disolvTesults (): Prints the strings, their lengths, and states whether they re palindrome or not Sample I/O: Please enter first string lamps Please enter first string: james please enter second string: sator Arepo Tenet Opera Rotas Length of the first string is 5 Length of the second string is 29 First string is not palindrome Reverse of the first string Is: sema U Reverse of the second string is: Sator Arepo Tenet opera Rotas Would you like to continue with another pair of strings (vor N)? nExplanation / Answer
#include using namespace std; int main() { int n, num, digit, rev = 0; cout > num; n = num; do { digit = num % 10; rev = (rev * 10) + digit; num = num / 10; } while (num != 0); coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.