网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下列程序的运行结果是()。includevoid fun(int *a, int *b){int *k; k=a; a=b; b=k;}ma
下列程序的运行结果是( )。 #include <stdio.h> void fun(int *a, int *b) { int *k; k=a; a=b; b=k; } main() { int a=3,b=6, *x=&a, *y=&b; fun(x,y); printf("%d%d",a,b);
A.6 3
B.3 6
C.编译出错
D.0 0
参考答案
更多 “ 下列程序的运行结果是()。includevoid fun(int *a, int *b){int *k; k=a; a=b; b=k;}ma 下列程序的运行结果是( )。 #include <stdio.h> void fun(int *a, int *b) { int *k; k=a; a=b; b=k; } main() { int a=3,b=6, *x=a, *y=b; fun(x,y); printf("%d%d",a,b);A.6 3B.3 6C.编译出错D.0 0 ” 相关考题
考题
以下程序的运行结果是 【 8 】 。int k=0;void fun(int m){ m+=k; k+=m; printf("m=%d k=%d ",m,k++);}main( ){ int i=4;fun(i++); printf("i=%d k=%d\n",i,k);}
考题
阅读下面程序,则程序的执行结果为【19】。#include "stdio.h"fun(int k,int *p){ int a,b;if(k==1||k==2)*p=1;else{ fun(k-1,a);fun(k-2,b);*p=a+b;}}main(){ int x;fun(6, x);printf( "%d\n",x);}
考题
阅读下面程序段,则执行后输出的结果是#include "stdio.h"main(){ char fun(char,int);char a=′A′;int b=13;a=fun(a,b);putchar(a);}char fun(char a,int b){char k;k=a+b;return k;}A.AB.MC.ND.L
考题
以下程序的执行结果是______ includevoid func(int); void main(){ int k=4 func(k)
以下程序的执行结果是______include<iostream.h>void func(int);void main(){int k=4func(k) ;func(k) :cout<<end1;}void func(int a){static int m=0;m+=a;cout<<m<<" ";}
考题
下列程序的输出结果是()。includevoid fun(int*a,int*B){int *k;k=a;a=b;b=k;}main(){i
下列程序的输出结果是( )。 #include<stdio.h> void fun(int*a,int*B){ int *k; k=a;a=b;b=k;} main() { int a=1,b=2,*x=a,*y=b; fun(x,y); printf("%d%d",a,B); }A.2 1B.1 2C.编译出错D.0 0
考题
请阅读以下程序:includeincludevoid fun(int b[]){static int i=0;do{b[i]
请阅读以下程序: #include<stdio.h> #include<string.h> void fun(int b[]) { static int i=0; do {b[i]+=b[i+1]; }while(++i<2);} main() { int k,a[5]={1,3,5,4,9}; fun(A); for(k=0;k<5;k++)printf("%d",a[k]);} 上面程序的输出是( )。A.13579B.48579C.48549D.48999
考题
下列程序的运行结果是()。includevoid fun (int *a,int*b){int*kk=a;a=b;b=k}void
下列程序的运行结果是( )。 #include< iostream.h> void fun (int *a,int*b) {int*k k=a;a=b;b=k} void main() {int a=2004, b=9,*x=a,*y=b; fun(x, y) ; cout<<a<<" "<<b<<endl:}A.20049B.92004C.0D.编译时出错
考题
该程序运行的结果是( )。#include#include#define M 100void fun(int m, int *a, int *n){ int i,j=0;for(i=1;i=m;i++)if(i%7==0||i==0)a[j++]=i;*n=j;}main(){ int aa[M],n,k;clrscr();fun(10,aa,n);for(k=0;kif((k+1) ==0)printf("\n");else printf("M",aa[k]);printf("\n");}
考题
以下程序的运行结果是______。 include fun(int a,int b) { int m=0,i=2; i+=m+1; m
以下程序的运行结果是______。include<iostrearn.b>fun(int a,int b){int m=0,i=2;i+=m+1;m=i+a+b;return m;}void main(){int k=4,m=1,p;p=fun(k,m);cout<<p<<end1;}
考题
现有如下程序段#include "stdio.h"int fun(int k,int *m){if(k%3)*m=k*k;else *m=k/3;}main(){ int (*p)(int,int *),m;p=fun;(*p)(78, m);printf( "%d\n",m);}则程序段的输出结果为A.24B.25C.26D.27
考题
以下程序的输出结果是【 】。include defineN 5 int fun(int *s,int a,int n) {int j; *s=
以下程序的输出结果是【 】。include <stdio.h>define N 5int fun(int *s,int a,int n){ int j;*s=a j=n;while(a!=s[j]) j-;return j;main(){ int s[N+1]; int k:for(k=1 ;k<=N;k++) s[k]=k+1:print f("%d\n",fun(s,4,N));}
考题
下列程序的运行结果是()。includevoid fun(int*s,int*p){ static int t=3;*p=s[t];t--;
下列程序的运行结果是( )。#include<stdio.h>void fun(int*s,int*p){ static int t=3; *p=s[t]; t--;}void main(){ int a[]={2,3,4,5),k; int x; for(k=0;k<4;k++) { fun(a,x); printf("%d,",x); }}A.5,4,3,2B.2,3,4,5,C.2,2,2,2,D.5,5,5,5,
考题
下列程序的运行结果是______。 void fun(int *a,int *b) { int *k; k=a;a=b;b=k; } main() { int a=3,b=6,*x=a,*y=b; fun(x,y); printf("%d%d",a,b); }A.63B.36C.编译出错D.0
考题
下列程序的运行结果是()。 include voidfun(int*s,int*p) {static int t=3; *p=s[t]; t
下列程序的运行结果是( )。#include<stdio.h>voidfun(int*s,int*p){ static int t=3;*p=s[t];t--;}void main(){ int a[]={2,3,4,5},k;int x;for(k=0;k<4;k++){ fun(a,x);printf("%d,",x);}}A.5,4,3,2B.2,3,4,5,C.2,2,2,2,D.5,5,5,5,
考题
下列程序的运行结果是includevoid fun(int * a,int * b){int * k; k=a; a=b; b=k;}
下列程序的运行结果是 #include<iostream.h> void fun(int * a,int * b) { int * k; k=a; a=b; b=k; } void main( ) { int a=3,b=6, * x=a, * y=b; fun(x, y) ; cout < < a < < " " < < b; }A.6 3B.3 6C.编译出错D.0 0
考题
下列程序的运行结果是()。includevoid fun(int *a, int *b) {int *k; k=a; a=b; b=
下列程序的运行结果是( )。#include<iostream.h>void fun(int *a, int *b) {int *k; k=a; a=b; b=k;}void main(){int a=2OO4,b=9,*x=a,*y=b;fun(x, y);cout<<a<<" "<<b<<end1;}A.20049B.92004C.0D.编译时出错
考题
请读程序: include void fun(int * s) { static int j=0; do s[j]+=s[j+1]
请读程序: # include<stdio.h> void fun(int * s) { static int j=0; do s[j]+=s[j+1] while( + + j<2); } main( ) { int k,a[10]={l,2,3,4,5}; for(k=l;k<3;k+ +)fun(a); for(k=0;k<5;k++)prinf("%d",a[k]); } 上面程序的输出结果是 ( )A.34756B.23445C.35745D.12345
考题
有以下程序 include void fun(int a[],int n) { int i,t; for(i=0;
有以下程序 #include <stdio.h> void fun(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;} } main() {int k[10]={1,2,3,4,5,6,7,8,9,10},i; fun(k,5); for(i=2;i<8;i++) printf("%d",k[i]); printf("\n"); } 程序的运行结果是______。A.345678B.876543C.1098765D.321678
考题
有以下程序 include int fun(int (*s)[4],int n,int k) {int m,i;
有以下程序 #include <stdio.h> int fun(int (*s)[4],int n,int k) {int m,i; m=s[0][kl; for(i=1;i<n;i++) if(s[i][k]>m) m=s[i][k]; return m; } main() { int a[4][4]={{1,2,3,4},{11,12,13,14}, {21,22,23,24}, {31,32,33,34}}; printf("%d\n",fun(a,4,0)); } 程序的运行结果是______。A.4B.34C.31D.32
考题
有下列程序: include void fun(int * s,int n1,int n2) { int i,j,
有下列程序: #include <stdio.h> void fun(int * s,int n1,int n2) { int i,j,t; i=n1;j=n2; while(i<j){t=s[i];s[i]=s[j];s[j]=t;i++;j--;} } main() { int a[10]={1,2,3,4,5,6,7,8,9,0},k; fun(a,0,3); fun(a,4,9);fun(a,0,9); for(k=0;k<10;k++)printf("%d",a[k]);printf("\n"); } 程序的运行结果是( )。A.987654321B.4321098765C.5678901234D.987651234
考题
下列程序的运行结果是 inClude roid fun(int *a,int * b) { int * k; k=a;a=b
下列程序的运行结果是 #inClude<iostream.h> roid fun(int *a,int * b) { int * k; k=a;a=b;b=k;} void main( ) { int a=2004,b=9,* x=a,* y=b; fun(x,y); cout < < a < <" " < < b < < end1;}A.2004 9B.9 2004C.0 0D.编译时出错
考题
下面程序的运行结果是#include "stdio.h" void fun(int k,int *p) { int a,b; if(k==1|| k==2) *p=1; else { fun(k-1,a); fun(k-2,b); *p=a+b; } }main(){ int x; fun(6,x); printf("%d\n",x);}
考题
有如下程序段#include "stdio.h"void fun(int *a,int *b,int *c,int *d,int *e){ int i,j,k,m; for(i=0;i *a;i++) for(j=0;j *b;j++) for(k=0;k*c;k++) for(m=0;m *d;m++) ++*e;}main(){ int a=10,b=10,c=10,d=10,e=0; fun(a,b,c,d,e); printf("%d\n",e);} 则程序段的输出结果是A.10000 B.1000 C.100 D.0
考题
以下程序的输出结果是#include "stdio.h"int *fun(int *a,int *b){ int m; m=*a; m+=*b-3; return(m);}main(){ int x=21,y=35,*a=x,*b=y; int *k; k=fun(a,b); printf("%d\n",*k);}
考题
下列程序的运行结果是includevoid fun(int *a,int *B){int *k;k=a;a=b;b=k;}void m
下列程序的运行结果是 #include<iostream.h> void fun(int *a,int *B) {int *k; k=a;a=b;b=k; } void main( ) {int a=3,b=6,*x=a,*y=b; fun(x,y); cout << a <<" "<< b; }A.63B.36C.编译出错D.0
考题
下列程序的运行结果是includevoid fun(int*a,int*b){int*k; k=a;a=b;b=k;}void mai
下列程序的运行结果是 #include<iostream.h> void fun(int*a,int*b) { int*k; k=a;a=b;b=k; } void main() { int a=3,b=6,*x=a,*y=b; fun(x,y); cout < < a < < " " < < b; }A.6 3B.3 6C.编译出错D.O 0
考题
单选题有以下程序:#include void fun(int *s,int t,int *k){ int p; for(p=0,*k=p;p if(s[p]s[*k])*k=p;}main(){ int a[10]={11,12,13,14,15,16,20,18,19,10},k; fun(a,10,k); printf("%d,%d",k,a[k]);}程序运行后的输出结果是( )。A
6,20B
10,9C
7,20D
10,10
热门标签
最新试卷