Answered step by step
Verified Expert Solution
Question
1 Approved Answer
THIS IS C++ ET-575-Strings - Homework 1. String Manipulation. a) Input two string variables named firstn and lastn. b) Store your first name in the
THIS IS C++
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.SStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started