阅读下面程序:includefun(int a,int b){int c;c=a+b;return c;}void main(){int x= 阅读下面程序: #include<iostream.h> fun(int a,int b) { int c; c=a+b; return c; } void main() { int x=6,y=7,z=8,r; r=fun((x--,y++,x+y),z--); cout<<r<<endl; } 则该程序的输出结果是( )。A.11B.20C.21D.31

阅读下面程序:includefun(int a,int b){int c;c=a+b;return c;}void main(){int x=

阅读下面程序: #include<iostream.h> fun(int a,int b) { int c; c=a+b; return c; } void main() { int x=6,y=7,z=8,r; r=fun((x--,y++,x+y),z--); cout<<r<<endl; } 则该程序的输出结果是( )。

A.11

B.20

C.21

D.31


相关考题:

阅读下面程序,则程序的执行结果为【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);}

下面程序的运行结果是includevoid fun(int * a,int * b){ int x= * a; * a = * b;* 下面程序的运行结果是 #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; }A.12 12B.12 21C.21 12D.21 21

下列程序的运行结果是()。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 void fun(int * a,int * b) { int x= * a; * a= * 下面程序的运行结果是#include<iostream.h>void fun(int * a,int * b){int x= * a;* a= * b; * b=X;cout < < * a < < * b < <" ";}void main( ){int x=1,y=2;fun(x,y) ;cout < < X < < y < < endl;}A.12 12B.12 21C.21 12D.21 21

阅读下面程序,则程序执行后的结果为#include "stdio.h"main(){int a=4,b=6,c=7;double d,fun(int,int,int);d=fun(a,b,c);printf("%lf\n",d);}double fun(int a,int b,int c){double s;s=a%b*c;return s;}A.27B.27.000000C.28D.28.000000

以下程序中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是A.main( ) { int *p; fun(p); ┆ } int fun(int *p) { int s; p=s;}B.main( ) { int *p; fun(p); ┆ } int fun(int **p) { int s; *p=s;}C.#include<stdlib.h> main( ) { int *p; fun(p); ┆ } int fun(int **p) { *p=(int*)malloc(2);}D.#include<stdlib.h> main( ) { int *p; fun(p); ┆ } int fun(int *p) { p=(int*)malloc(sizeof(int));}

以下程序段中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是______。A.main() { int *p; fun(p); …… } int fun(int *p) {int s; p=s;}B.main() { int *p; fun(p); …… } int fun(int **p) {int s; *p=s;}C.# include<stdlib. h> main() {int *p; fun(p); …… } int fun(int **p) {*p=(int *)malloc(2);}D.# include<stdlib. h> main() { int *p; fun(p); …… } int fun(int *p) {p=(int *)malloc(sizeof(int));}

下面程序的运行结果是( )。include main(){int a=25; fun(A); }fun(int *x){ print 下面程序的运行结果是( )。include<stdio.h>main(){int a=25;fun(A);}fun(int *x){ printf("%d\n",++*x);}

以下程序的输出结果是#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);}

以下程序段中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是A.main() { int*p; fun(p); … } int fun(int*p) {int s; p=s; }B.main { int *p; fun(p); … } int fun(int**p) {int s; *p=s; }C.#include <stdlib.h> main() { int *p; fun(p); … } int fun(int**p) {*p=(int*)malloc(2); }D.#include <stdlib.h> main() { int *p; fun(p); … } int fun(int *p) {p=(int*)malloc(sizeof(int));}