单项选择题

下面的语句中动态分配的内存,其释放语句正确的是( )。
im*q=new[10];

A.delete q;
B.delete q[0];
C.delete[]q;
D.delete*q;
<上一题 目录 下一题>
热门 试题

单项选择题
在软件开发中,下面不属于设计阶段的任务的是( )。
A.数据结构设计
B.定义模块算法
C.给出系统模块结构
D.定义需求并建立系统模型
单项选择题
若磁盘上已存全路径文件名为c: ctest test.txt的文件,下面语句中不能打开该文件的是( )。
A.ifstream *pFile=new ifstream("c:\\ctest\\test.txt");
B.ifstream file("c:\\ctest\\test.txt");
C.ifstream file;file.open("c:\\ctest\\test.txt");
D.ifstream file("c:\etest\test.txt");
相关试题
  • 在TestClass类的定义中,对赋值运算符=进...
  • 已知递归函数fun的定义如下: int fun(i...
  • 有如下程序: #include<iostream> usi...
  • 若需要把一个函数 void fun(): 定义...
  • 有如下程序: #include<iostream> usi...