下面程序错误的语句是①include ②void main()③{④int * p=new int[1]⑤p=9⑥cout 下面程序错误的语句是①#include<iostream.h>②void main()③{④ int * p=new int[1]⑤ p=9⑥ cout<<* p<<end1;⑦ delete []p;⑧}A.④B.⑤C.⑥D.⑦

下面程序错误的语句是①include ②void main()③{④int * p=new int[1]⑤p=9⑥cout<<* p<

下面程序错误的语句是

①#include<iostream.h>

②void main()

③{

④ int * p=new int[1]

⑤ p=9

⑥ cout<<* p<<end1;

⑦ delete []p;

⑧}

A.④

B.⑤

C.⑥

D.⑦


相关考题:

下面程序错误的语句是①include ②void main( 0③{④int * p = new int[1] ;⑤p =9;⑥co 下面程序错误的语句是 ①#include < iostream.h> ②void main( 0 ③{ ④ int * p = new int[1] ; ⑤ p =9; ⑥ cout <<*p <<end1; ⑦ delete [ ] p; ⑧ }A.④B.⑤C.⑥D.⑦

下面程序错误的语句是 ① include ② void main( ) ③ { ④ int * p=new int[1] ; ⑤ p 下面程序错误的语句是① #include<iostream.h>② void main( )③ {④ int * p=new int[1] ;⑤ p=9;⑥ cout < < * p < <endl;⑦ delete[ ] p;⑧ }A.④B.⑤C.⑥D.⑦

下面程序错误的语句是①#include②void main()③{④int*p=new int[1];⑤p=9;⑥cout *p⑦delete[]p⑧}A.④B.⑤C.⑥D.⑦

下面程序运行时输出结果为______。 include include class Rect { public: Rect(int 下面程序运行时输出结果为______。include<iostream.h>includeclass Rect{public:Rect(int l, int w){length=l; width=w;)void Print(){cout<<"Area:"<<length*width<<end1;}void operator delete(void*p){free(p);}private:int length, width;};void main(){Rect *p;p=new Rect(5, 4);p->Print();delete p;}

下面程序的功能是输出数组s中最小元素,请填空。 include void main(){int k, p, s[]= 下面程序的功能是输出数组s中最小元素,请填空。include<iostream.h>void main(){int k, p, s[]={1,-9,7,2,-10,3};k=s[0];for(p=0;p<6;p++)if(s[p]<k) 【 】;cout<<k;}

下面程序的输出结果是【】。 include using namespace std; int d=1; fun(int p){ stati 下面程序的输出结果是【 】。include <iostream>using namespace std;int d=1;fun(int p){static int d = 5;d+ =p;cout<<d;return (d) ;}void main ( ) {int a =3;cout<<fun ( a + fun (d) )<<endl;}

下面程序的运行结果是【】。 include void main() {char s[]="9876",*p;for(p=s;p 下面程序的运行结果是【 】。include<iostream.h>void main(){char s[]="9876",*p;for(p=s;p<s+2;p++)cout<<p;}

下面程序运行时输出结果为【】。 include include class Rect { public: Rec 下面程序运行时输出结果为【 】。include<iostream.h>include<malloc.h>class Rect{public:Rect(int1,int w)(length=1;width=w;)void Print(){cout<<"Area:"<<length *width<<endl;)void *operator new(size-t size){return malloc(size);}void operator delete(void *p){free(p)private:int length,width;};void main(){Rect*p;p=new Rect(5,4);p->Print();delete p;}

以下程序的输出结果是【】。includevoid main() {int *p;p=new int;*p=200;cout 以下程序的输出结果是【 】。include<iostream. h>void main() {int *p;p=new int;*p=200;cout<<*p;delete p;}

下面程序执行的结果是【 】。 include using namespace std; void main(){ int sum=0; i 下面程序执行的结果是【 】。include <iostream>using namespace std;void main(){int sum=0;int array[6]={1,2,3,4,5,6};int *p;p=array[0];for(int i=0;i<6;i++){sum=sum+*p;p++;}cout<<sum;}

下面程序错误的语句是 #include“iostream.h” ① void main( ) ② { ③ int A=0; ④ int B; ⑤ B=A; ⑥ cout<<B; ⑦ cout<<A; ⑧ }A.②B.③C.④D.⑥

下面程序的运行结果是()。includeusing namespace std;class A{ int a;public: A(){a= 下面程序的运行结果是( )。 #include<iostream> using namespace std; class A { int a; public: A(){a=0;1 A(int aa ) {a=aa;} virtual void show() { cout<<a>>"";} }; class B:public A int b: public: B(){b=0:} B(int bb) {b=bb;} void show() {cout<<b>>" ";} }; class C:public B { int c; public: C(int cc) { c=cc;} void show() {cout<<c>>endl;} }; void main() { A a( 8 ),*p;B b( 9 );C c( 10 ); p=a; p->show(); p=b; p->show(); p=c; p->show(); }A.8 8 8B.8 9 10C.0 0 10D.10 10 10

下面程序的执行结果是 #include"iostream.h" void main( ) { int *p,r; p=new int; *p = 20; r=sizeof(*p); cout<<r<<endl; delete p; }A.程序错误B.内存为20地址的大小C.20D.4

下列程序的执行结果为includevoid main( ) { int a=3,b=0; int * p=a; b=+a+ 下列程序的执行结果为#include<iostream.h>void main( ){int a=3,b=0;int * p=a;b=+a++;cout < < * p < < "," < < b < < endl;}A.3,4B.4,3C.3,4D.4,4

如下程序的执行结果是 include void main( ) { static int a[ ]={ 1,7,3,9,5,11 如下程序的执行结果是 #include<iostream.h> void main( ) { static int a[ ]={ 1,7,3,9,5,11 }; int * p=a; * (p+3)+=4; cout < < * p < <"," < < * (p+3);}A.1,13B.1,16C.3,13D.1,14

类中包含了一个静态成员函数,则main函数中和P.fl(P);语句具有同样功能的语句为______。include<iostream.h>class M{public:M(int A){A=a;B+=a;}static void fl(M m);private:int A;static int B;};void M::f1(M m){cout<<"A="<<m.A<<endl;cout<<"B="<<m.B<<endl;}int M::B=10;void main( ){M P(5);P.f1(P);}

下面程序的输出结果是【】。 include int d=1; int fun(int p){ static int d=5; d+=p; 下面程序的输出结果是【 】。include<iostream.h>int d=1;int fun(int p){static int d=5;d+=p;cout<<d<<" ";return d;}void main(){int a:3;cout<<fun(a+fun(D) )<<end1;}

假定n=3,,下列程序的运行结果是()。includeint Fun(int m)void main(){cout 假定n=3,,下列程序的运行结果是( )。 #include<iostream.h> int Fun(int m) void main() { cout<<"Please input a number:"; int n,s=0; cin>>n; s=Fun(n); cout<<s<<endl; } int Fun(int m) { iht p=1,s=0; for (int I=1;I<=m;I++) { p*=I; S+=p; } return s; }A.7B.9C.8D.10

以下定义数组中错误的是下面程序的执行结果是 #include"iostream.h" void main() {int*p,r; p=new int; *p=20; r=sizeof(*p); cout<<r<<endl; delete p; }A.程序错误B.内存为20地址的大小C.20D.4

下面程序错误的语句是 #include"iostream.h" ① void main() ② { ③ int A=0; ④ int&B; ⑤ B=A; ⑥ cout<<B; ⑦ cout<<A; ⑧ }A.②B.③C.④D.⑥

下列程序的执行结果为includevoid main(){int a=3,b=0; int * p=a; b=+a+ 下列程序的执行结果为 #include<iostream.h> void main() { int a=3,b=0; int * p=a; b=+a++; cout<< * p<<”,” <<b<<endl; } A)3,4 B)4,3 C)3,4 D)4,4 (15)下面程序的运行结果为 #include<iostream.h> void main() { for(int a=0,x=0;! xa<=10;a++) { a++; } cout<<a<<end1; }A.10B.11C.12D.0

下列程序的执行结果为includevoid main( ){ int a=3,b=0; int * p=a; b=+a++; 下列程序的执行结果为 #include<iostream.h> void main( ) { int a=3,b=0; int * p=a; b=+a++; cout<<*p<<','<<b<<end1; }A.3,4B.4,3C.3,4D.4,4

下面程序的执行结果是( )。 #include”iostream.h” void main() {int*p,r; p=new in; *p=20; r=sizeof(*p); cout<<r<<endl delete p;}A.程序错误B.内存为20地址的大小C.20D.4

下面的程序中,错误的语句是( )。 ①#inCludeiostream.h ②void main ③{ ④ int *p=new int[1]; ⑧P=9; ⑥cout.*Pendl; ⑦delete[]p; ⑧}A.④B.⑤C.⑥D.⑦

假定a=3,下列程序的运行结果是()。includeint fun(int n);void main(){cout 假定a=3,下列程序的运行结果是( )。 #include<iostream.h> int fun(int n); void main() { cout<<"Please input a number:"; int a,result=0; cin>>a; result=fun(a); cout<<result<<end1; } int fun(int n) { int p=1,result=0; for(int i=1;i<=n;i++) { p*=i; result +=p; } return result; }A.4B.8C.9D.20

下列程序的输出结果是 ______。includevoid main(){ int a[]={1,2,3,4,5,6},*p,**q; 下列程序的输出结果是 ______。 #include <iostream.h> void main() { int a[]={1,2,3,4,5,6},*p,**q; p=a; q=p; cout<<*(p++); cout<<**q<<end1; }A.34B.56C.12D.23

下列程序的运行结果是______。 include class Base { public: virtual void func(int 下列程序的运行结果是______。include<iostream.h>class Base{public:virtual void func(int i){cout<<"class Base:"<<i<<end1;)};class Derived: public Base{public:void func(double d){cout<<"class Derived:"<<d<<endl;}};void main( ){Base a,*p=a;Derived b;p=b;(*p).func(3.3);}