Question: Below is start.cpp Purpose The purpose of this lab is to gain experience with passing values by reference. You will modify one function and write

 Below is start.cpp Purpose The purpose of this lab is to
gain experience with passing values by reference. You will modify one function
Below is start.cpp
and write another using this idea. Instructions 1. A piece of starter
code called Start.cpp has been put on Canvas, start by downloading there
should be no errors and it should run. If it does not,
let your instructor know. 2. We want to convert the function addOne

Purpose The purpose of this lab is to gain experience with passing values by reference. You will modify one function and write another using this idea. Instructions 1. A piece of starter code called Start.cpp has been put on Canvas, start by downloading there should be no errors and it should run. If it does not, let your instructor know. 2. We want to convert the function addOne to instead of passing by value to the function to instead pass by reference, because of this the function will then return no values (in other words, the return type will be void). . Now that the function has been changed, uncomment the line of code in main that reads testAddOne(. This is a test that we wrote that when run will pass by reference a value to the function you have just converted. It will run a series of five tests against your function, any tests that pass will print an "OK" to the screen. After all tests have run, you should see a message saying ALL addone TESTS PASS". If you do not see this message, there is a problem with your code. 4. Now we want you to wirite another function called minusone. We have given you the prototype for the function at the top of the code, notice that it takes a reference as an argument. Once you have the function written, uncomment both the testMinusOne

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!