Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

I want a code c++ Thanks for your efforts and cooperation Please answer quickly 1. Using pointer notation only, write each of the following functions:

image text in transcribed

image text in transcribed

I want a code c++ Thanks for your efforts and cooperation Please answer quickly

1. Using pointer notation only, write each of the following functions: (Use pointers to move between array cells). a. determine the number of characters in N int NameLength(char *N) { ..) b. Return 1 if N ends with a vowel and return 0 otherwise int End With Vowel(char *N) { C. Return 1 if N and its reverse are the same and return 0 otherwise (Palindrome) int IsPalindrome(char *N) { d. This function appends string s2 to string 51. The first character of s2 replaces the terminating NULL character of s1. The address of s1 is returned. Enough memory must be already allocated for s1 before the function can be executed. char * strConcat(char *s1,const char *s2){.................} e. The function returns one of the following: O if the string s1 equals the string s2. -1 (or a negative integer) if the string s1 the string s2. Note: strCompare(Mohammad, mohammad) returns a zero since they are similar strings regardless to the case of the letters. int strCompare(const char *s1,const char *52) {... 2. In your main function, read 10 names from the user (using a matrix) and display the following list of options to the user: 1. The average name length in the matrix 2. The median (bwe) name length of all the names in the matrix 3. Concatenate two strings: the user enters the matrix row numbers of the names he wants to concatenate, the program concatenates the desired strings if the destination string has enough space for the concatenation, it displays the message "No enough memory for concatenation" otherwise. 4. The number of names ending with a vowel 5. The number of palindrome names 6. The list of names in alphabetical order 7. Exit Your program must keep on giving the above list of options to the user and displaying the desired result on screen, until the user chooses (7). Note that the values given by all the functions (average, median, number of palindrome.......) will be changed after any concatenation, so whenever the user chooses a certain option, it must be recomputed. 1. Using pointer notation only, write each of the following functions: (Use pointers to move between array cells). a. determine the number of characters in N int NameLength(char *N) { ..) b. Return 1 if N ends with a vowel and return 0 otherwise int End With Vowel(char *N) { C. Return 1 if N and its reverse are the same and return 0 otherwise (Palindrome) int IsPalindrome(char *N) { d. This function appends string s2 to string 51. The first character of s2 replaces the terminating NULL character of s1. The address of s1 is returned. Enough memory must be already allocated for s1 before the function can be executed. char * strConcat(char *s1,const char *s2){.................} e. The function returns one of the following: O if the string s1 equals the string s2. -1 (or a negative integer) if the string s1 the string s2. Note: strCompare(Mohammad, mohammad) returns a zero since they are similar strings regardless to the case of the letters. int strCompare(const char *s1,const char *52) {... 2. In your main function, read 10 names from the user (using a matrix) and display the following list of options to the user: 1. The average name length in the matrix 2. The median (bwe) name length of all the names in the matrix 3. Concatenate two strings: the user enters the matrix row numbers of the names he wants to concatenate, the program concatenates the desired strings if the destination string has enough space for the concatenation, it displays the message "No enough memory for concatenation" otherwise. 4. The number of names ending with a vowel 5. The number of palindrome names 6. The list of names in alphabetical order 7. Exit Your program must keep on giving the above list of options to the user and displaying the desired result on screen, until the user chooses (7). Note that the values given by all the functions (average, median, number of palindrome.......) will be changed after any concatenation, so whenever the user chooses a certain option, it must be recomputed

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_2

Step: 3

blur-text-image_3

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students explore these related Databases questions