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

  Explain the reason for the project development

Two members of your project development team are differing about relative significance of training and documentation.

  Show the parse tree for the expression 110

The second grammar is unambiguous. This means that every expression in the language has exacty on parse tree. Show the parse tree for the expression 110.

  Which major providers offer cdma and which pcs

Through a web search contrast CDMA with PCS systems. Which major providers offer CDMA, and which PCS? Search for the keyword WAP.

  What stack elements remain

suppose a stack-oriented processor that includes the stack operations PUSH and POP. Arithmetic operations automatically involve the top one or two stack elements. Begin with an empty stack.

  Creating robust interaction and dialogue

The Discussion Board (DB) is part of the core of online learning. Classroom discussion in an online environment requires the active participation of students.

  When is off-line programming normally used

Timers and counters use words of memory, but contacts, coils, and branch start instructions do not.

  How pipelining improves the throughput and latency of system

You will write a technical report on "The performance comparison of pipeline to non-pipelined system design". Describe how pipelining improves the throughput and latency of the system.

  Find current court case involving computer crime

Summarize the case and judge for yourself if there really was a crime committed or not. Explain your reasoning based on the laws you researched for your state

  Write a statement of scope

Write a statement of scope that describes the software. Be sure your statement of scope is bounded. If you're unfamiliar with robots, do a bit of research before you begin writing.

  Implement the student profile program

The Student Profile Program logs student information to an external file. The system must allow for the entry of multiple students.

  Privacy data policy in your companys data classification

The customer privacy data policy in your company's data classification standard requires encryption in two places

  Object data within a relational database management system

I am finding it difficult to understand the following: Contrasting performance within a relational database management system with/without indexes, use numeric/non-numeric key fields, maintaining/generating calculated fields.

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