Summerize a situation where you took the initiative to get others going on an important
第1题
阅读下面程序:
include <iostream.h>
void main()
{
int i,j,row=0,column=0,m;
static int a[3][3]={ 100,28,72,-30,2,-100};
m=a[0][0];
for (i=0;i<3;i++)
for (j=0;j<3;j++)
if (a[i][j]<m)
{
m=a[i][j];
row=i;
column=j;
}
cout<<m<<","<<row<<","<<column<<endl;
}
该程序的功能是【 】,其执行结果为上丝【 】。
第2题
阅读下面程序: #include<iostream.h> void main() { int i,j,row=0,column=0,min; static int a[3][3]={100,28,72,-30,2,-100}; min=a[0][0]; for(i=0;i<3;i++) for(j=0;j<3;j++) if(a[i][jl<min) { min=a[i][j]; row=i; column=j; } cout<<min<<","<<row<<","<<column<<endl; } 该程序的执行结果为()。
A.-100,2,3
B.-100,1,2
C.100,1,1
D.100,0,0
第3题
阅读以下程序:
include<iostream.h>
void main()
{
static int a[][3]={9,7,5,3,1,2,4,6,8};
int i,j,s1=0,s2=0;
for(i=0;i<3;i++)
for(j=0;j<3;j++)
{
if(i==j)s1=sl+a[i][j];
if(i+j==2)s2=s2+a[i][j];
}
cout<<s1<<","<<s2<<endl;
}
则该程序的输出结果为【 】。
第4题
下列程序的输出结果是______。
include<iostream.h>
void main()
{
char a[]="abcdabcabfgacd";
int i1=0,i2=0,i=0;
while(a[i])
{
if(a[i]=="a")i1++;
if(a[i]=="b")i2++;
i++;
}
cout<<i1<<""<<i2<<endl;
}
第5题
阅读下列程序:
include<iostream.h>
void fun(int n)
{
int x(5);
static int y(10);
if(n>0)
{
++x;
++y;
cout<<x<<","<<y<<endl;
}
}
void main()
int m(1);
fun(m);
}
则该程序的输出结果是______。
第6题
下列程序的运行结果为 #include<iostream.h> int i=0; class A{ public: A(){i++;} }; void main() { A a,b[3] ,*c; c=b; cout << i << end1; }
A.2
B.3
C.4
D.5
第7题
阅读下面程序:
include <iostream.h>
int fun2(int m)
{
if(m%3==0)
return 1;
else
return 0;
}
void fun1(int m, int &s)
{
int i;
for (i=1; i<m; i++)
if(fun2(i))
S=S*i;
}
void main()
{
int n=9, s=2;
fun1(n, s);
cout<<s<<end1;
}
该程序的运行结果是【 】。
第8题
以下程序的输出结果是 #include<iostream.h> void reverse(int a [ ] ,int n) {int i,t; for(i=0;i<n/2;i++) {t=a[i];a[i]=a[n-1-i];a[n-1-i]=t;} } void main() {int b[10]={1,2,3,4,5,6,7,8,9,10}
A.22
B.10
C.34
D.30
第9题
下列程序的运行结果为 #include<iostream.h> int i=0; class A{ public: A(){i++;} }; void main() { Aa,b[3],*c; c=b; cout<<i<<end1;
A.2
B.3
C.4
D.5
第10题
下列程序段的输出结果是【 】。
include<iostream.h>
void main()
{int i=10,sum=0;
do
{
sum=+sum+i;
i=i-2;
}while(i>=2);
cout<<sum<<end1;
}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!