Question: Pointers Memory deallocation Deallocate the memory of the pointer you just created. Copy the lines you had above to print out the address of the

Pointers Memory deallocation Deallocate the memory of the pointer you just created. Copy the lines you had above to print out the address of the pointer, the content of the pointer and the content of the pointee, on different lines. Where is the pointer pointing to? What is the content of the pointee? You should get a run time error (or garbage values which are even worse) if you followed the instructions correctly. Your error comes from the fact that you are trying to read the value of the memory address which has been released. Comment out the line to print out the content of the pointee, and you should be all right. Assign the null value to your pointer Print the information again. Where is the pointer pointing to? What is the content of the pointee? You will also get a run time error, like before, this time because you are trying to read the value of the memory address 0 (which does not exist). Comment out the line to print out the content of the pointee, and you should be all right.

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!