單項選擇題

假定指針變量p定義為“int*p=newint(100);”,要釋放p所指向的動態(tài)內(nèi)存,應使用語句()。

A.deletep;
B.delete*p;
C.delete&p;
D.delete[]p;

微信掃碼免費搜題