Question: What is wrong in the following code? double * p 1 = new double; double * p 2 = p 1 ; * p 2
What is wrong in the following code?
double new double;
double;
;
delete ;
cout endl;
p and p point to the same data, but it was destroyed using delete p So you cannot access it later using p
p got deleted
p got deleted and p got deleted
None of the answer choices are correct
p does not have a value
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
