diff options
| author | Morgan Cyrus <[email protected]> | 2022-10-30 11:09:54 -0700 |
|---|---|---|
| committer | Morgan Cyrus <[email protected]> | 2022-10-30 11:09:54 -0700 |
| commit | 13b62b61fd90328855721c026bcbbd1126fb04d6 (patch) | |
| tree | a3a5e8d117cedb4360cc634a0bb937dea8f03240 | |
| parent | exercise 1 done (diff) | |
| download | cst116-ch10-debugging-cyrus-13b62b61fd90328855721c026bcbbd1126fb04d6.tar.xz cst116-ch10-debugging-cyrus-13b62b61fd90328855721c026bcbbd1126fb04d6.zip | |
changed constant to 10
| -rw-r--r-- | CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp index 1e3d58b..4096fdd 100644 --- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp +++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp @@ -3,32 +3,55 @@ *
* General Instructions: Complete each step before proceeding to the
* next.
-*
-* Debugging Exercise 1
+*/
+/* Debugging Exercise 1
*
* 1) Build and run the program.
+* done
+*
* 2) Examine the code and the output and notice the use of
* parallel arrays.
+* done
+*
* 3) Insert breakpoints at Breakpoint 1, Breakpoint 2, and Breakpoint
* 3.
+* done
+*
* 4) Run to Breakpoint 1.
+* done
+*
* 5) Place a watch on varX, varY and varZ. Click on the '+' in the
* watch window to see the individual elements associated with each
* of the arrays.
+* done
+*
* 6) Continue running your program to Breakpoint 2.
+* done
+*
* 7) Add a watch on the array called name. Again, click on the '+'
* symbol. Notice how a multidimensional array is shown in the
* debugger, the null terminating characters location, and how a
* character is represented within each element of the array.
+* done
+*
* 8) Continue running the program to Breakpoint 3.
+* done
+*
* 9) Notice the contents of varX and varY now that you are back in the
* main function.
+* done
+*
* 10) Clear all the breakpoints.
+* done
+*
* 11) Stop debugging.
-*
-* Debugging Exercise 2
+* done
+*/
+
+/* Debugging Exercise 2
*
* 1) Change the constant SIZE from 5 to 10.
+*
* 2) Change any literal containing a 5 to the constant SIZE.
* Notice the usefulness of the constant when changes need
* to be made to your code.
@@ -44,8 +67,9 @@ * 7) Stop debugging.
* 8) Disable all breakpoints.
* 9) Rebuild and execute the program and verify the results.
-*
-* Debugging Exercise 3
+*/
+
+/* Debugging Exercise 3
*
* 1) Just before the call to the PrintFunction in main, add an
* assignment statement to change the first element in the
@@ -69,8 +93,8 @@ * by displaying the new ASCII value too.
* 10) Stop debugging.
* 11) Disable all breakpoints.
-*
-********************************************************************/
+*/
+
#include <iostream>
#include <iomanip>
using std::cin;
@@ -84,7 +108,7 @@ void FunctionTwo(const int varX[], const int varY[], int varZ[]); void PrintFunction(const int varX[], const int varY[],
const int varZ[]);
-const int SIZE = 5;
+const int SIZE = 10;
int main()
{
|