有如下程序:#includeiostreamusingnamespacestd;intmain(){int*P;*P=9:coutThevalueatP:*P;return0;}编译运行程序将出现的情况是( )。A.编译时出现语法错误,不能生成可执行文件B.运行时一定输出ThevalueatP:9C.运行时一定输出ThevalueatP:*9D.运行时有可能出错

有如下程序:

#include<iostream>

usingnamespacestd;

intmain()

{

int*P;

*P=9:

cout<<"ThevalueatP:"<<*P;

return0;

}

编译运行程序将出现的情况是( )。

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

B.运行时一定输出ThevalueatP:9

C.运行时一定输出ThevalueatP:*9

D.运行时有可能出错


相关考题:

若有以下程序段:include using namespace std;int main (){ int a[]={1,4,5}; int *p 若有以下程序段: #include <iostream> using namespace std; int main () { int a[]={1,4,5}; int *p=a[0],x=6, y,z; for (y=0; y<3; y++) z= ( (* (p+y) <x) ? *(p+y) :x); cout<<z<<end1; return 0; } 程序运行后的输出结果是( )。A.1B.4C.5D.2

设程序如下:includeusing namespace std;int main(){int **p,*q,r=10;q=r;p= int main() { int **p,*q,r=10; q=r; p=q; cout<<**p+1<<end1; return 0; } 以上程序的输出结果是( )A. p的地址B. r的地址C.11D.运行错误

若有如下程序:include using namespace std;int main(){ char *p="abcdefgh",*r; lon 若有如下程序: #include <iostream> using namespace std; int main() { char *p="abcdefgh",*r; long *q; q=(long *)p; q++; r=(char *)q; cout<<r<<end1; return 0; } 上述程序的输出结果是( )。A.abcdefghB.0C.abcdD.efgh

有以下程序:includeusing namespace std;int n[][3]={10,20,30,40,50,60};int main() 有以下程序: #include<iostream> using namespace std; int n[][3]={10,20,30,40,50,60}; int main() { int (*p)[3]; p=n; cout<<p[0] [0]<<","<<*(p[0]+1)<<","<<(*p) [2]<<end1; return 0; } 上述程序执行后的输出结果是( )。A.10,20,30B.20,30,40C.10,30,50D.10,40,60

若有如下程序段: include using namespace std; int main() {char*p="abcdefgh",*r;l 若有如下程序段:include <iostream>using namespace std;int main(){char *p="abcdefgh",*r;long *q;q=(long *)p;q++;r=(char *)q;cout<<r<<end1;return 0;}该程序的输出结果是______。

有如下程序: #include<iostream) using namespace std; int main() { int*p; *p=9; cout<<“The value at p:”<<*p; return 0; } 编译运行程序将出现的情况是( )。A.编译时出现语法错误,不能生成可执行文件B.运行时一定输出:The value at p:9C.运行时一定输出:The value at p:*9D.运行时有可能出错

有如下程序: include using namespace std; int main() { int *p; 有如下程序: #include<iostream> using namespace std; int main() { int *p; *p=9; cout<<"The value at p:"<<*p; return 0; } 编译运行程序将出现的情况是A.编译时出现语法错误,不能生成可执行文件B.运行时一定输出:The value at p:9C.运行时一定输出:The value at p:*9D.运行时有可能出错

有以下程序:includeusingnamespacestd;int main (){ int a[]={1,2,3, 4,5, 6, 7,8,9, 有以下程序: #include<iostream> using namespace std; int main () { int a[]={1,2,3, 4,5, 6, 7,8,9, 10, 11, 12}; int *p=a+5, *q=0; *q=* (p+5); cout<<*p<<" "<<*q<<end1; return 0; }A.运行后报错B.66C.6 12D.5 5

有如下程序:include using namespace std;int main(){ int *p; *p = 9;cout 有如下程序: #include <iostream> using namespace std; int main() { int *p; *p = 9; cout << "The value at p: " << *p; return 0; } 编译运行程序将出现的情况是( )。A.编译时出现语法错误,不能生成可执行文件B.运行时一定输出:The value at p:9C.运行时一定输出:The value at p:*9D.运行时有可能出错

有如下程序:includeusing namespace std;int main(){int *p;*p=9;cout 有如下程序: #include<iostream> using namespace std; int main() { int *p; *p=9; cout<<"The value at p:"<<*p; return 0; } 编译运行程序将出现的情况是( )A.编译时出现语法错误,不能生成可执行文件B.运行时一定输出:The value at p:9C.运行时一定输出:The value at p:*9D.运行时有可能出错