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

  Questionwrite down java-like pseudocode to specify the

questionwrite down java-like pseudocode to specify the logic for following program application-write down an

  Wap that creates a hundred mb file on your local disk

Sequential overwrite. Overwrite the file with 100MB of new data by writing the file from beginning to end and then calling fsync().

  Write a top-down design and interactive ada program

Write a top-down design and interactive Ada program to read an invoice number, quantity ordered, and unit price (all integers), and compute the total price.

  Write program to interactively selectary rectangular region

Write a program to interactively selectary rectangular region of the Mandelbrot set and to zoom in on the selected region.

  Find the last occurrence of the word time

Find and delete the line with the word existentialism in it, delete the following line as well. Find the last occurrence of the word time.

  Code for addition of new product and delete existing code

Implement the AJAX Programming based solutions in order to write a code to: 1) Add a new product to database. 2) Delete an existing product from database

  What bandwidth is available for the dma controller

A processor executes 1000K instructions per second. The bus system allows a bandwidth of 5 MB per second. Assume that each installation requires on average.

  Construct a network of linear units

Construct a network of linear units that is capable of representing the XOR function of two inputs.

  Discuss cia triad of security be applied to an organization

How can the CIA triad of security be applied to an organization and not just a single system ? Give examples to support your position

  Shows how the it and biblical concepts are related

Create a document which shows how the IT and Biblical concepts are related. (What are the similarities between these ideas?)

  How to integrate the various functions of an entity

As an IT manager, discuss how your company will use Enterprise Resource Planning (ERP) to integrate the various functions of an entity.

  Find the full names of supervisors together with the total

Find the full names of supervisors together with the total number of employees directly supervised by each one of them.

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