String Exercise 1: Learn and Practice (Optional)
The code in this exercise is the starting point for the next exercise, so learn it well.
Use ex3_stringA.cpp
in the replit team project or copy the following code into your IDE:
The purpose of the program is to learn and practice the
.length()
, .find()
and .substr()
string functions by:
- Reading the code carefully
- Adding 2 lines of code as indicated in the comments.
- Compiling and running this C++ program to observe the results
When you are done:
- Take a screenshot of your IDE and console window after running the program.
- For this exercise, you will have:
ex3_stringA.cpp
. Complete all the exercises in this lab before uploading the zip file produced by replit.