Question: Instructions Instructions: Download the StarterCodes 4 Prog 0 5 . cpp that will help you get started - scroll down to find this file )

Instructions
Instructions:
Download the StarterCodes4Prog05.cpp that will help you get started - scroll down to find this file):
Write a program that takes a string as input (at least 20 characters). The program will then perform the following operations on
the string:
a: The original string, stored in str1
b: Count and display the number of characters in the string.
c: Makes a new copy of the string, stored in str2, and display the contents of this new string.
d : On the new string, it appends the string "Dallas College" - then display the full string.
e: On the new string, starting at first character until the 12
th character, it displays those.
f: On the new string, insert/push a character at the end -'s', then display the string.
g: On the new string, remove or pop a character, then display the string.
Sample program run is:
This program will accept a string (at least 20 characters) as input and uses different string operations to produce different outputs.
Enter a string ((at least 20 characters): Different String operations
a: Original string: Different String operations
b: Number of characters: 27
c: A copy of the string stored in 'str2' is: Different String operations
d: String after appending 'Dallas College' is: Different String operations Dallas College
e: Substring from the first to the 12th character is: Different S
f: String after inserting 's' at the end is: Different String operations Dallas Colleges
g: String after removing a character from the end: Different String operations Dallas College
 Instructions Instructions: Download the StarterCodes4Prog05.cpp that will help you get started

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!