Convert letters from one case to the other

Assignment Help Computer Engineering
Reference no: EM132200332

Write functions and function prototypes for the following:

char* copy(char* destination, const char* source, size_t num)

Copy the first num characters of a string from the address specified by source to that specified by destination. Note that source and destination are both pointers. Return a pointer to the start of the copied string.

char* reverseCopy(char* destination, const char* source, size_t num)

Copy the first num characters of a string from the address specified by source to that specified by destination, reversing the order of the characters. Return a pointer to the start of the copied string.

char* caseChangeCopy(char* destination, const char* source, size_t num)

Copy the first num characters of a string in which the case of each lowercase character is shifted to uppercase (and uppercase to lowercase), from the address specified by source to that specified by destination. Return a pointer to the start of the copied string.

You can use the character functions found in the C standard library header file <cctype> to determine whether a character is an uppercase or lowercase letter, and to convert letters from one case to the other.

char* replaceCopy(char* destination, const char* source, char target, char replace, size_t num)

Copy the first num characters of a string in which each instance of a "target" character is replaced by the "replace" character, from the address specified by source to that specified by destination. Return a pointer to the start of the copied string.

void read(char* destination, int n)

Read a string of characters entered by the user at the keyboard with a length no longer than n characters (including the null character at the end of the C string) into an address specified by destination. The user should be able to type a space or tab as part of the string.

The getline() method of the istream class in the header file <iostream> can be used to read a string that contains spaces or tabs into an array of char.

Feel free to use the existing C string manipulation functions in the C standard library header file <cstring> when coding the functions required for this assignment.

Reference no: EM132200332

Questions Cloud

Identify how student loan debt can affect : Identify how student loan debt can affect my, Credit score, Future budget, Spending goals/habits?
Do you view the deduction as a soon to be benefit : Which of these would be most effective in social security reform? Detail your choices, noting the why's of your choices and also discuss the effects.
Write the function strappened that appends the character : Write the function strappened (char^*str, char c) that appends the character c to the end of the C-string pointed by str you can use any notation.
What is the expusre called : DKNY owes Ptas 70 million in 30 days for a recent shipment of Spanish textiles.
Convert letters from one case to the other : Determine whether a character is an uppercase or lowercase letter, and to convert letters from one case to the other.
What is the main pro of fee splitting referrals : Describe the differences in effort and cost-reducing s for flat salary physicians and physicians who share in the profits of the practice.
What is reward-to-volatility ratio of the best feasible CAL : The correlation between the fund returns is .0630. What is the reward-to-volatility ratio of the best feasible CAL
Show the amount of jeans or corn : Consider two neighbouring island countries called Felicidad and Bellissima. They each have 4 million labour hours available per week that they can use.
Write a function that has two linked-list head pointers : Assume that the linked lists items are ordered by the

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a sub procedure that plays the game ro-sham-bo

IE 212 Homework: Programming Structures. Write a sub procedure that plays game Ro-Sham-Bo (a.k.a., Rock, Paper, Scissors) for player and computer opponent

  Describe the pros of enabling auditing of resource accesses

Describe the pros and cons of enabling auditing of resource accesses. What is a virus? How can users and system administrators prevent virus infections?

  Write a function that accepts as arguments

In statistics, the mode of a set of values is the value that occurs most often or with the greatest frequency.

  Two-way authentication between humans and computers

There is a lot of work being done on phishing, but none of it is so far a convincing solution to the problem - Are there any neat ways

  Design a raptor program that uses an array

Design a Raptor program that uses an array to store 5 values entered by the user and then displays the numbers in reverse order. Use two loops: one for reading the user entered values into the array

  Servers have on the traditional sdlc

express in your own words the advantages of specifying pre-conditions, post-conditions, and invariants. How, specifically, do they help to increase the quality of functions.

  Techniques for executing equijoin

Discuss the different techniques for executing equijoin of two files located at different sites.

  Write a method findlongestpalindrome

Write a method findLongestPalindrome(String s) that returns the longest palindrome (string that matches its own reverse) contained within the parameter s.

  Write minimum two paragraphs in a word document

Submit a proposed reference list of at least eight sources that are properly cited according to APA format. I would like to see a variety of sources, for example not just articles from one journal. Please use the Keiser University library link as ..

  Describe the measurable benefits of progressing

Describe the measurable benefits of progressing up the CMMI model. From an auditing perspective, determine the manner in which these benefits might be observed.

  Give overview on emerging trends in wearable computing

Give a detailed explanation of Wireless Access Protocol (WAP). Explain with the help of some examples.

  Describe the tangible and intangible values

Locate a news article in an IT trade magazine about an organization that is implementing a new computer system. Describe the tangible and intangible values that the organization likely will realize from the new system.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd