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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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