Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with this code, please. 1. Write a program that does following string control and manipulation operations by using pointers: a. Prompt the user to

Help with this code, please.

1. Write a program that does following string control and manipulation operations by using pointers:

a. Prompt the user to enter two strings, count number of characters in the strings, print length of the strings, print if the given strings are palindrome.

b. Use main( ) as the driver function. Allow the user to run the program as many times as desired.

c. Write 6 functions that main( ) calls to accomplish the task:

. (10 Points) getStrings( ): Prompts the user for two strings. Use pointer variables.

2. (20 Points) getLength ( ): Determines the lengths of each string. Returns length of the given string.

3. (30 Points) isPalindrome( ): Determines a given string is palindrome or not. Returns true if palindrome or returns false otherwise.

4. (10 Points) displayReverse(): Prints given string in reverse.

5. (20Points ) concat() ;displays given two strings concatenation.

6. (10 Points) displayResults( ): Prints the strings, their lengths, and states whether they are palindrome or not.

Sample I/O:

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 Second string is a palindrome.

Reverse of the first string is: semaJ

Reverse of the second string is: Sator Arepo Tenet Opera Rotas

Would you like to continue with another pair of strings (Y or N)? n

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

6. Be able to choose and prepare a training site.

Answered: 1 week ago