Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ on Visual Studio Code ET-575 - Strings - Homework 1. String Manipulation. a) Input two string variables named firstn and lastn. b) Store your

C++ on Visual Studio Code
image text in transcribed
ET-575 - Strings - Homework 1. String Manipulation. a) Input two string variables named firstn and lastn. b) Store your first name in the variable firstn and last name in lastn. c) Concatenate the values of firstn and lasnt with a space in the middle and store into a third variable fullname (such as "John Smith"). d) Print the variable fullname. e) Print the length of the variable fullname. f) Use functions to insert a middle initial into the fullname variable including spaces (such as "John H. Smith"). g) Print the updated fullname variable. h) Access the string by index and print only the initials each separated by a period (such as J.H.S.) Have the program do all the work and your solution should work for any name. Example (Input in bold) Enter your first name > John Enter your last name > Smith Output Name: John Smith Length: 10 Name: John H. Smith Initials: J.H.S

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions

Question

5. A review of the key behaviors is included.

Answered: 1 week ago

Question

3. An overview of the key behaviors is presented.

Answered: 1 week ago