中国大学MOOC: char* p = new char(32);释放内存的语句是:
举一反三
- 中国大学MOOC: char* a = new char[32];对应的释放内存的语句,哪种写法最好?
- char* p = new char(32);释放内存的语句是: A: delete &p; B: delete *p; C: delete [] p; D: delete <char> p;
- char* p = new char(32);释放内存的语句是: A: delete [] p; B: free(p) C: delete p; D: delete <char> p;
- char* p = new char(32);释放内存的语句是: A: delete [] p; B: free(p) C: delete p; D: delete <char> p;
- char* p = new char[65];对应的释放内存的语句是: A: free p; B: delete *p; C: delete [] p; D: delete p[];