聽力原文:Where would you like to go tonight?
(A) It is on your right side.
(B) That's all right.
(C) I will go for fun with my friends.
(15)
A.
B.
C.
第1題
下列程序段的輸出結果是 #include<iostream.h> void fun(int * X,int * y) { cout < < * X < < * y; * X=3; * y=4; } void main() { int x=1,y=2; fun(&y,&x); cout < < X < < y < < end1; }
A.2143
B.1212
C.1234
D.2112
第2題
下列程序段的輸出結果是 #include<iostream.h> void fun(int * x,int * y) { cout << * X << * y; *X=3; *y=4; } void main() { int x=1,y=2; fun(&y,&x); cout << X << y<<endl; {
A.2143
B.1212
C.1234
D.2112
第3題
下列程序運行后的輸出結果是()。 #include<iostream.h> void fun(int,int,int*); void main() { int x,y,z; fun(5,6,&x); fun(7,x,&y); fun(x,y,&z); cout<<x<<","<<y<<","<<z<<endl; } void fun(int a,int b,int *c) { b+=a; *c=b-a; }
A.5,5,5
B.6,6,6
C.5,6,7
D.7,7,7
第4題
以下程序輸出結果是 ______。 #include<iostream.h> void fun(int x,int y,int z){z=x+y;} void main() { int a=10; fun (2,2,a); cout<<a; }
A.0
B.4
C.10
D.無定值
第5題
以下程序的輸出的結果是()。 #include<iostream.h> int x=3: void main() { void fun(); int i; for(i=1;i<x;i++) fun(); } void fun() { static int x=1; x*=x+1; cout<<x<<" "; }
A.3,3
B.2,2
C.2,6
D.2,5
第6題
閱讀下列程序:
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);
}
則該程序的輸出結果是______。
第7題
以下程序運行后的輸出結果是【 】。
include<iostream.h>
void fun(int x,int y)
{ x=x+y;y=x-y;x=x-y;
cout<< x << "," <<y << " ,";}
void main()
{ int x=2,y=3;fun(x,y);
cout<< x << "," << y << endl;}
第8題
下列程序段的輸出結果是_______。 #include <stdio.h> void fun(int *px, int *py) { printf("%d %d\n", *px, *py); *px=3;*py=4; } int main() { int x=1,y=2; fun(&x,&y); printf("%d %d\n",x, y); }
第9題
閱讀下面程序:
include<iostream.h>
void fun(int n)
{
int x(5);
static int y(10);
if(n>0)
{
++x;
++y;
cout<<x<<","<<y<<end1;
}
}
void main()
{
int m(1);
fun(m);
}
則該程序的輸出結果是______。
第10題
下面程序輸出結果是28,請將程序補充完整 #include <iostream.h> int a[8]={1,2,3,4,5,6,7}; void fun(int *pa,int n); int main() { int m=8; fun(a,m); cout< <a[7]> < <endl; return 0; } void fun(int *pa,int n) { for (int i="0;i<n-1;i++)" _________________>
為了保護您的賬號安全,請在“上學吧”公眾號進行驗證,點擊“官網服務”-“賬號驗證”后輸入驗證碼“”完成驗證,驗證成功后方可繼續查看答案!