Using concepts from Chapters 1 – 3 only. Do not use any functions.
Design a program that is based on string and array objects.
Declare and initialize this string:
string Original = “I missed Chapter #3 lab. Now I have to perform this lab. “;
Draw a box menu on the screen using the # symbols.
Have menu options to copy, find, replace, size and print.

###################################
# String and Array Program #
# #
# Copy string into the array and verify #
# Find a word #
# Erase a word #
# Replace a word and add two words #
# Size of the array #
# Print the content of the array #
# Quit the program #
# #
###################################


Copy the string above name Original into an array named Chapter3-Array.
The string must be place in the 0 position of the Chapter3-Array only.
Verify by displaying/print on screen the Chapter3-Array to show that 0 position contains the string.

Use the Find() function to locate the word “perform”.
Display/print the position where “perform” begins.

Use the Erase() function to erase the word “this” and use the insert() function to insert this string “a new “.


Use the Replace() function to replace “Now” with the words “And now “.


Display the size of Chapter3-Array.

Display the content of the Chapter3-Array showing the changes made from choosing options 1 - 5.



Answer :

Other Questions