Chapter 14: Problem 12
What is wrong with the following code? int *p; //Line 1 int *q; //Line 2 p = new int; //Line 3 *p = 43; //Line 4 q = p; //Line 5 *q = 52; //Line 6 delete q; //Line 7 cout << *p << " " << *q << endl; //Line 8
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.