aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
diff options
context:
space:
mode:
authortafaar <[email protected]>2022-10-11 18:57:34 -0700
committertafaar <[email protected]>2022-10-11 18:57:34 -0700
commit971e54ead527995b4c446e7c8ec59e6fb5f4cef2 (patch)
tree1675b9dd8a67a31f798c83520ecee3b622fe18c4 /CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
parentDid exercise 3.4 (diff)
downloadcst116-chapter8-debugging-hill-971e54ead527995b4c446e7c8ec59e6fb5f4cef2.tar.xz
cst116-chapter8-debugging-hill-971e54ead527995b4c446e7c8ec59e6fb5f4cef2.zip
Answered 4.5-6
Diffstat (limited to 'CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp')
-rw-r--r--CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
index 9143aff..1e20102 100644
--- a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
+++ b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
@@ -58,7 +58,13 @@
* 3) Verify that the contents of count is garbage.
* 4) Step into the loop.
* 5) What is the value stored in count now?
+*
+* 10
+*
* 6) Where was 10 assigned to count?
+*
+* In the for loop.
+*
* 7) Fix the problem and re-run to verify.
********************************************************************/
#include <iostream>
@@ -78,7 +84,7 @@ int main()
// Breakpoint 2
// Put a breakpoint on the following line
- for (count = 0; count < 10; count++);
+ for (count = 0; count < 10; count++)
cout << count << endl;
return 0;