→ tszyi:因為p指向的記憶體被釋放,所以q指到的值是不確定。 04/16 20:57
int *p = new int;
Int *q=p;
*q=10;
delete p;
p = NULL;
What the value does the variable q contain?
每次做到指標的題目都卡住,懇請各位詳解謝謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.78.35.34
※ 文章網址: http://www.ptt.cc/bbs/TransCSI/M.1397442740.A.4BE.html