题目内容

chara = new char[32];对应的释放内存的语句,哪种写法最好()

A. delete a;
B. a = nullptr;
C. B.delete a;
D. C.delete [] a;
E. D.delete [] a;
F. a = nullptr;

查看答案
更多问题

For the statement: inta[10],b; the correct description is[ ]()

A. a can only be lvalue, but b can be rvalue
B. a can only be rvalue, but b can be lvalue
C. both a and b can only be lvalue
D. both a and b can only be rvalue

If compiled with a STANDARD C COMPILER (e.g. gcc), which is correct about the following function “add”? [ ]double add(int , int , int k) {
return (double) (8+k);
}
int main(){
int x=1, y=2If compiled with a STANDARD C COMPILER (e.g. gcc), which is correct about the following function “add”? [ ]double add(int , int , int k) {
return (double) (8+k);
}
int main(){
int x=1, y=2

A. Compile error. After filling in the name of the formal parameters, the program can be compiled without errors;
B. Compile error. After changing “int k” to “double k”, the program can be compiled without errors;
Compile error. After changing ” return (double) (8+k);” to “return 8+k”, the program can be compiled without errors;
D. Compile success

本课程讨论区不建议问下列哪些问题()

A. cout.flush()函数的参数是什么
B. 如何安装Visual Studio 2019
C. 谁能帮我编一段排序算法的代码
D. 我的main()函数如下int main(){ char x { ‘\0’ }; std::cin >> x; std::cout cin.get(); return 0;}我编译运行,并且输入了字符a之后,屏幕没有显示输出结果。我尝试了几次,都是同样的情况。我的开发环境是Windows 10上面的Visual Studio 2017

The correct description about the following program is[ ]#include
int pPointer;
int nNumber;
void f(){
nNumber = 25;
pPointer = &nNumber;
}
int main(){
f();
printf(“ValuThe correct description about the following program is[ ]#include
int pPointer;
int nNumber;
void f(){
nNumber = 25;
pPointer = &nNumber;
}
int main(){
f();
printf(“Valu

A. the types of pointers do not match
B. there are memory leaks
C. there is “hanging-up” pointer
D. no problem

答案查题题库