diff --git a/pretext/AtomicData/Pointers.ptx b/pretext/AtomicData/Pointers.ptx index 5e5cb22..2d8acc2 100644 --- a/pretext/AtomicData/Pointers.ptx +++ b/pretext/AtomicData/Pointers.ptx @@ -212,7 +212,7 @@ int main( ) { better error handling with the keyword. The null pointer is often used in conditions and/or in logical operations.
The following example demonstrates how the null pointer works.
- The variable ptrx initially has the address of x when it is declared.
+ The variable pntrN initially has the address of varN when it is declared.
On the first iteration of the loop, it is assigned the value of
If the lines (varN = 50;) and (cout << *ptrN << endl;) were inserted into line 7-8, what would it cout?
+If the lines (varN = 50;) and (cout << "ptrN: " << *ptrN << endl;) were inserted between lines 7 and 8, what would it cout?
varPntr: 9
+pntrN: 100
Not quite, the variable varN no longer equals 100 past line 7!
@@ -265,7 +265,7 @@ int main( ) {varPntr: 50
+pntrN: 50
Right!
@@ -274,7 +274,7 @@ int main( ) {varPntr: 150
+pntrN: 150
No, the values do not add together!