Top
/
Dangling pointers
/
Answer-20C-5
Answer to Question 20C-5
Variable
p
is not assigned any value. It starts out as a dangling pointer. Statement
*p = 50;
tries to store 50 at whatever memory address is in variable
p
. The consequences of that can vary from none to catastrophic.