问题

有如下程序: <br>#include<br>using namespace std;<br>int main()<br>{<br>int *p;<br>*p =9;<br>cout&lt;&lt;"The value at p:"&lt;&lt;*p;<br>return 0;<br>}<br> 编译运行程序将出现的情况是 <br>

A .够编译时出现语法错误,不能生成可执行文件 <br>

B .运行时一定输出: The value at p: 9<br>

C .运行时一定输出: The value at p: *9<br>

D .运行时有可能出错 <br>

参考答案
您可能感兴趣的试题
  • 有如下程序:#includeusing namespace std;int main(){void function(double val);double val;function(val);cout
  • 有如下类定义:class AA{int a;public:int getRef() const{return &a;} // ①int getvalue() const{return a;} // ②
  • 有如下程序:#include +using namespace std ;#includeusing namespace std;class Base{public:void fun(){cout$a
  • 下面是重载为非成员函数的运算符函数原型,其中错误的是A . Fraction operator + (Fraction, Fraction);B . Fraction operator - (Frac
  • 有如下函数模板:templateT cast(U u){return u;}其功能是将 U 类型数据转换为 T 类型数据。已知 i 为 int 型变量,下列对模板函数 cast 的调用中正确的是A .
  • 若磁盘上已存在某个文本文件,其全路径文件名为 d:\ncre\test.txt ,下列语句中不 能打开该文件的是A . ifstream file(d:\ncre\test.txt) ;B . i
相关内容