网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
【单选题】以下程序运行后的输出结果是_____。#include <iostream>using namespace std;void main(){ char m; m='B'+32; cout<<m<<endl;}
A.B
B.b
C.66
D.98
参考答案和解析
7
更多 “【单选题】以下程序运行后的输出结果是_____。#include <iostream>using namespace std;void main(){ char m; m='B'+32; cout<<m<<endl;}A.BB.bC.66D.98” 相关考题
考题
以下程序的输出结果是【】。 include using namespace std; int main() {char S[]="abcde
以下程序的输出结果是【 】。include <iostream>using namespace std;int main(){char S[ ]="abcdef";s[3]='\0';cout<<s<<end1;return 0;}
考题
下列程序的输出结果是______。 include include using namespace std; voi
下列程序的输出结果是______。include<iostream.h>include<string.h>using namespace std;void fun(const char*s,char C) {c=s[strlen(s)/2];}int main(){char str[]="ABCDE";char ch=str[1];fun(str,ch);cout<<ch;return 0;}
考题
下面程序运行后输出的结果是【】。 include using namespace std; class example{ const
下面程序运行后输出的结果是【 】。include <iostream>using namespace std;class example{const int m;public:example(int i):m(i){}void pr(){cout<<"m="<<m<<endl'}};int main(){example x(100);x.pr();return 0;}
考题
若下面程序运行时输出结果为1,A,10.1 2,B,3.5 include using namespace std; int mai
若下面程序运行时输出结果为1,A,10.12,B,3.5include <iostream>using namespace std;int main(){void test(int, char, doubie【 】);test(1, 'A', 10.1 );test(2, 'B');return 0;}void test(int a, char b, double c){cout<<a<<','<<b<<','<<c<<endl;}
考题
下面程序的执行结果是______。 include include using namespace std; vo
下面程序的执行结果是______。include<iostream.h>include<iomanip.h>using namespace std;void main(){cout<<setfill('x')<<setw(10);cout<<"Hello"<<endl;}
考题
程序的输出结果是【 】。 include using namespace std; class A{ public: A(){a=b=2;}
程序的输出结果是【 】。include <iostream>using namespace std;class A{public:A(){a=b=2;}A(int i,int j){a=i;b=j;}void display(){cout<<a<<b;}private:int a,b;};void main(){A m,n(4,8);m.display();n.display();}
考题
以下程序的输出结果是【】。 include using namespace std; void fun() {static int a=0
以下程序的输出结果是【 】。include <iostream>using namespace std;void fun(){static int a=0;a+=2;cout<<a;}int main(){int CC;for(CC=1;cc<4;CC++)fun();cout<<end1;return 0;}
考题
以下程序的输出结果是【】。 include using namespace std; int main(){ int sum,i; for(
以下程序的输出结果是【 】。include<iostream>using namespace std;int main(){int sum,i;for(sum=0,i=1;i<5;i++)sum+=i;cout<<sum<<endl;return 0;}
考题
下列程序的输出结果是______。 include using namespace std; void fun(int rf) {
下列程序的输出结果是______。include<iostream>using namespace std;void fun(int rf){rf*=2;}int main(){int num=500;fun(num);cout<<num<<endl;return 0;}
考题
下面程序运行输出的结果是【】。 include using namespace std; int main(){char a[]="C
下面程序运行输出的结果是【 】。include <iostream>using namespace std;int main(){char a[]="Chinese";a[3]='\0';cout<<a<<endl;return 0;}
考题
有如下程序: include using namespace std; int main() { cout.f
有如下程序: #include<iostream> using namespace std; int main() { cout.fill('*') cout.width(6); cout.fill('#') cout<<123<<endl; return 0; } 执行后的输出结果是A.###123B.123###C.***123D.123***
考题
下面程序的执行结果是【】。 include include using namespace std; void main(
下面程序的执行结果是【 】。include<iostream>include<iomanip>using namespace std;void main(){cout<<setfill('x')<<setw(10);cout<<"Hello"<<endl;}
考题
下列程序的输出结果为( )。 #include (iostream) using namespace std; void main( ) char,a[ ] = { "hello" ," the" ," world" }; char * * pa = a: pa + +; cout << * pa << ENDL; }A.helloB.theC.worldD.hellotheworld
考题
以下程序的输出结果是()。includevoid func(char**m) {++m:cout
以下程序的输出结果是( )。 #include<iostream.h> void func(char**m) { ++m: cout<<*m<<endl; } void main() { static char*a[]={"MORNING","AFTERTOON","EVENING"}; char**n; n=a: func(n); }A.为空B.MORNINGC.AFTERTOOND.EVENING
考题
以下程序的输出结果是()。includeusing namespace std;void fun(char**q){++q;cout
以下程序的输出结果是( )。 #include<iostream> using namespace std; void fun(char**q) { ++q; cout<<*q<<end1; } main() { static char*s[]={"HI","HELL0","TEST"}; char**p; p=s; fun(p); system("PAUSE"); return 0; }A.为空B.HIC.HELL0D.TEST
考题
下面程序的运行结果为( )。include using namespace std;void main( ) { for(int a =0
下面程序的运行结果为( )。 #include <iostream> using namespace std; void main( ) { for(int a =0,x =0; !xa < =10; a ++ ); cout << a << endl;A.0B.1C.10D.11
考题
下列程序的输出结果是 #include"iostream" using namespace std; int Max(int a,int b) { if(a>b) return a; else return b; } void main( ) { int m,n; m=10,n=5; int max = Max(m,n); cout<<max<<endl; }A.10B.程序有误C.1D.0
考题
下列程序的输出结果是【】。 include include using namespace std; void fun(c
下列程序的输出结果是【 】。include<iostream>include<cstring>using namespace std;void fun(const char *s,char c){c=s[strlen(s)/2];}int main(){char str[]="ABCDE";char ch=str[1];fun(str,ch);cout<<ch;return 0;}
考题
有以下程序,其输出结果是()。include using namespace std;int main(){ char a[10]={'
有以下程序,其输出结果是( )。 #include <iostream> using namespace std; int main(){ char a[10]={'1','2','3','4','5','6','7','8','9',0},*p; int i=8; p=a+i; cout<<p-3<<endl; return 0; }A.6789B.6C.789D.'6'
考题
下面程序输出的结果是()。includeusing namespace std;void main(){ char ch[][8]={"g
下面程序输出的结果是( )。 #include<iostream> using namespace std; void main() { char ch[][8]={"good","better","best"}; for(int i=1;i<3;++i) { cout<<ch[i]<<endl; } }A.good betterB.better bestC.good bestD.good
考题
若有以下程序: include using namespace std; int main() {char str[10];cin>>str;co
若有以下程序:include <iostream>using namespace std;int main(){char str[10];cin>>str;cout<< str<<end1;return 0;}当输入为:This is a program!那么执行程序后的输出结果是【 】。
考题
下列程序的输出结果是______。includeinclude using namespace std;void
下列程序的输出结果是______。include <iostream.h>include <cstring.h>using namespace std;void fun(const char*s,char C) {c=s[strlen (s)/2];}int main {){char str [] ="ABCDE";char ch=str[1];fun(str,sh);cout<<Ch;return 0;}
考题
以下程序的输出是【】。 include using namespace std; fun(intm) { static int n=1; n=m
以下程序的输出是【 】。include<iostream>using namespace std;fun(intm){static int n=1;n=m*n;return(n);}void main(){int i;for(i=1;i<=3;i++) cout<<fun(i);}
考题
以下程序的输出结果是()。includeincludeusing namespace std;void func(cha
以下程序的输出结果是( )。 #include<iostream> #include<stdlib> using namespace std; void func(char **m) { ++m; cout<<*m<<endl; } main() { static char *a[]={"MORNING","AFTERNOON","EVENING"); char **n; n=a; func(n); system("PAUSE"); return 0; }A.为空B.MORNINGC.AFTERNOOND.EVENING
考题
以下程序的运行结果是【】。 include include using namespace std; void main()
以下程序的运行结果是【 】。include<iostream>include<string>using namespace std;void main(){chara[10]="China",b[]="Chin",c[]="ese";cout<<strlen(strcat(strcpy(a,b),c))<<endl;}
考题
下面程序的输出结果是()。include using namespace std;void main( )int i,j,m=0,n=0;
下面程序的输出结果是( )。 #include <iostream> using namespace std; void main( ) int i,j,m=0,n=0; for(i=0;i<2;i++) for(j=0;j<2;j++) if(j> =i) m=1;n++; cout<<m<<endl; cout<<n;A.1 1B.1 4C.1 6D.0 2
考题
有以下程序:include using namespace std;class sample{private:int n;public:sample
有以下程序: #include <iostream> using namespace std; class sample { private: int n; public: sample(){} sample(int m) { n=m; } void addvalue(int m) { sample s; s.n=n+m; *this=s; } void disp () { cout<<"n="<<n<<endl; } }; int main() { sample s (10); s.addvalue(5); s.disp(); return 0; } 程序运行后的输出结果是A.n=10B.n=5C.n=15D.n=20
考题
下面的程序输出的结果是( )。 include using namespace std; void main(){
下面的程序输出的结果是( )。 #include <iostream> using namespace std; void main(){ int a=2; int c=a; a++; cout<<c; }A.2B.3C.4D.*a
热门标签
最新试卷