首页 › 答案 › 题库 › 远程教育 › 国家开放大学

已经int *p;,则下列语句中能够输出3的语句包括()。

已经int *p;,则下列语句中能够输出3的语句包括()。
A、p=new int(3);cout<<*p;
B、p=new int[3];cout<<*p;
C、p=new int[3]; p[0]=3; cout<<*p;
D、*p=3; cout<<*p;
正确答案:p=new int(3);cout<<*p;#p=new int[3]; p[0]=3; cout<<*p;
标签:语句