Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Strings in C++

Strings manipulation

Write one main code with the following functions.

Toggle

Write a function called toggle() that accepts a string, and an integer. The function checks whether the character at the position indicated by the passed integer is a letter or not. If it is a letter, it toggles its case. So, if it is a lowercase letter, make it an upper case, and if it is an uppercase letter make it a lower case. If the character is not a letter, it is left with no change.

In the main() function, prompt the user to enter a string, and the position of the character to be toggled, then print out the string after it has been changed.

Insert a Random Number

Write a function called insertRandomNumber() that accepts a string, and an integer. The function inserts a random number, in the range [ 0 - 9 ], in the string at the position indicated by the passed integer. In the main() function, prompt the user to enter a string, and the position at which the random number should be inserted!

Capitalize

Write a function called capitalize() that capitalizes the second and third letters of a string. If the string length s less than three, return the same string.

In the main() function, prompt the user to enter a string, and print out the string after t has been processed!

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93125453

Have any Question?


Related Questions in Computer Engineering

Systems analysis projectpersonal trainer inc owns and

Systems analysis project Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done well, and the company is planning an international expansion by opening a new "superce ...

If no payments are made a loan of amount 44000 would

If no payments are made, a loan of amount $44000 would increase to $49103.89 after 2 years of monthly compounding interest. If instead, payments of $718.87 are made at the end of each month, how many years would it be un ...

The population mean weight of product x is 100 pounds of

The population mean Weight Of product X Is 100 pounds of the population standard deviation is 10 pounds. Assuming the population is normally distributed, what is the Probability of obtaining a sample of 25 units of produ ...

Question suppose we have a hash table which has the hash

Question : Suppose we have a hash table which has the hash function integer % 13. For Quadratic and Linear Probing, what sequence of 13 different integers > 0 (positive) would create a worst-case situation over the entir ...

Question please assist with discussion questions please

Question: Please assist with discussion questions. Please answer following questions with at least 3 paragraph response. Thank you. Access control starts first with assessing risks so you can properly identify potential ...

Rgb ledsthree light-emitting diodes leds one red one green

RGB LED's Three light-emitting diodes [LEDs] (one red, one green, one blue) turn on when a number 0-7 is passed through. Red turns on with even numbers, green turns on with odd numbers, blue turns on with multiples of 3. ...

Question cyber attacks on critical infrastructures-a risk

Question: Cyber Attacks On Critical Infrastructures-A Risk To The Nation There has been a great deal of research related to cyber attacks and vulnerabilities and critical infrastructure, but there is an incomplete unders ...

Answer the following question 1 suppose a program has a

Answer the following Question : 1. Suppose a program has a button with the caption "Quit." Suppose also that the Name property of this button is btnQuit. Write a btnQuit_Click event procedure that gives the user a second ...

You are given a test to enter graduate school you must

You are given a test to enter graduate school. You must select 10 of the 13 essay questions to answer to determine your writing skills. How many ways can you select those questions?

Come with an app that only runs in horizontal orientation

Come with an app that only runs in horizontal orientation. It displays "This is fun!" on the top left corner of the screen with no margin either from the top or the left.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As