下面程序的输出结果是() cout<<<<end1 }) B) C) D)Hello B.Test C.Hello Test D.Hello Test HelloTest
相似题目
-
阅读下列程序片断: chars[]=”ABCD”,*p=s; cout<有关上述程序的输出结果,正确的判断是()。
-
给出下面程序的输出结果________#includeinti=0;voidfun(){{staticinti=1;cout<
-
以下程序段的输出结果是(). char *alp[]={ABC,DEF,GHI}; int j; cout << alp[1];
-
下面程序段的输出结果是int i, a[2][2] = {1,2,3,4};for(i=1; i>=0; i--) cout<
-
下列程序的输出结果是_____。#includeusingnamespacestd;intmain(){inti=5;int&r=i;r=7;cout<
-
下面程序错误的语句是 ①include < iostream.h> ②void main(0 ③{ ④ int * p = new int[1] ; ⑤ p =9; ⑥ cout <<*p <<end1; ⑦ delete [ ] p; ⑧ }
-
下面程序输出的结果为()。 inClUde”iostream.h” Class A {public: A(){cout<<“CLASS A”<<endl;} ~A()<)}; class B:public A {public: B(){cout<<”CLASSB”<<endl;} ~B(){}}; void main() {A*p; p=new B; B *q; q=new B;}
-
下面程序的输出结果是main(){int a=15,b=21,m=0;switch(a%3){ case 0:m++;break;case 1:m++;switch(b%2){default:m++;case 0:m++;break;}}cout<<m<<endl;}
-
下面程序的运行结果为()。 include<iostream.h> void swap(int &a,int B) { int temp; temp=a++; a=b; b=temp; } void main() { int a=2,b=3; swap(a,b); cout<<a<<“,”<<b<<end1; }
-
下列程序执行后,输出的结果是()。int x=-5,y=0;while(x)y++;cout<<y<<end1;A.1B.2C.4D.5
-
执行下列程序的结果是main(){float x=1,y;y=++x *++x;cout<<y<<end1;}
-
下列程序的运行结果是 include<iostream.h> class A { int a; public: A(){a=0;} A(int aa) { a=aa; cout<<a++; } }; void main() { A x,y(2),z(3); cout<<end1; }
-
下面程序的运行结果是 include<iostream.h> void fun(int * a,int * b) { int x= * a; * a = * b; * b=x; cout <<*a<< *b<<""; } void main(0 { int x =1,y =2; fun(&x,&y); cout<< x << y <<end1; }
-
有以下程序int f1(int x, int y){ return x>y? x:y;}int f2(int x, int y){ return x>y? y:x;}main(){ int a=4,b=3,c=5,d,e,f; d=f1(a,B) ;d=f1(d,C) ; e=f2(a,B) ;e=f2(e,C) ; f=a+b+c-d-e; cout<<d<<", "<<f<<", "<<e<<end1;}执行后输出结果是
-
执行下列代码,程序的输出结果是: cout <<″hex:″<< hex 255;> A、ff
-
下面程序的运行结果为 include<iostream.h> void main() { for(int a=0,x=0;! x&&a<=10;a++) { a++; } cout<<a<<end1; }
-
下列程序的运行结果为include<iostream.h>Void main(){int a=2;iht b=a+1;cout <<a/b <<end1;}A
-
下面程序的输出结果是 ______。include<iostream.h>voidmain(){intx=20;int&y=x;cout<<(x==y
-
下列程序的运行结果是()。 include<iostream.h> int x=5; int fun(int a) { int c; c=x*a; return c; } void main() { int x=3,a=4; x=x+fun(a); cout<<“x="<<x<<end1; }
-
以下程序的功能是:按顺序读入10名学生4门课程的成绩,计算出每个学生的平均分数并输出,程序如下: include<iostream> using namespace std; int main() { int n,k; float score,sum,ave; sum = 0.0; for(n = 1;n <=10; n++) { for(k =1;k<=4;k++) { cin>>score; sum += score; } ave=sum/4.0; cout<<"NO."<<n<<"ave:"<<ave<<end1; } return 0; } 上述程序运行后结果不正确,调式中发现有一条语句出现在程序中的位置不正确。 这条语句是非曲直()。
-
写出下面程序的输出结果: int a = 0,b = 10, c; c = a++; c = ++b; cout << a << "," << b << "," << c << endl;
-
执行以下程序:includevoidmain(void){charc=0;cout<<c<<’/n’;}输出的结果是________。
-
【单选题】下面程序段执行后的输出结果是 。 char c [5]= {'a','b','0','c','0'}; cout<<c;
-
数字字符0的ASCII值为48,若有以下程序 void main() { char a='1', b='2'; cout << b++ <<","; cout << b-a << endl; } 程序运行后的输出结果是()