●有以下C程序:char fun(char x,char y){if(x)return y;}main(){int a=′9′,b=′8′,c=′7′;printf("%c/n",fun(fun(a,b),fun(b,c)));}程序的执行结果是 (31) 。(31) A.函数调用出错B.8C.9D.7

●有以下C程序:

char fun(char x,char y)

{if(x)return y;

}

main()

{int a=′9′,b=′8′,c=′7′;

printf("%c/n",fun(fun(a,b),fun(b,c)));

}

程序的执行结果是 (31) 。

(31) A.函数调用出错

B.8

C.9

D.7


相关考题:

有以下程序: include using namespace std; char *x[]={"First", "Second", "Third" 有以下程序: #include <iostream> using namespace std; char *x[]={"First", "Second", "Third" }; void f(char *z[ ]) { cout<<*z++<<end1; } int main ( ) { char **y; y=x; f(y); return 0; }A.产生语法错误B.FirstC.SecpndD.Third

有以下程序:includefloat fun(int x,int y){return(x+y);}main(){int a=2,b=5,c=8; pr 有以下程序: #include<stdio.h> float fun(int x,int y) { return(x+y); } main() { int a=2,b=5,c=8; printf("%3.0f\n",fun((int)fun(a+c,b),a-c)); } 程序运行后的输出结果是( )。A.编译出错B.9C.21D.9

有以下程序: void swap(char*x,char*y) {cbar t; t=*x; *x=*y; *y=t; } main() {char*s1="abc",*s2="123"; swap(s1,s2);printf("%s,%s\n",s1,s2); } 程序执行后的输出结果是( )。A.123,abcB.abc,123C.1bc,a23D.321,cba

有以下程序: void swap(char*x,char*y) { char t; t=*x;*x=*y;*y=t; } main { char*s1="abe",*s2="123": swap(s1,s2); printf("%s,%s\n",s1,s2); } 程序执行后的输出结果是( )。A.123,abeB.abc.123C.1bc,a23D.321,cba

有以下程序:void swap(char*x,char*y){ char t;t=*x;*x=*y;*y=t;}main{ char*s1=abe,*s2=123:swap(s1,s2);printf(%s,%s\n,s1,s2);}程序执行后的输出结果是( )。A.A.123,abeB.abc.123C.1bc,a23D.321,cba

以下程序的输出结果是_______。includemain(){char*a="abcdefghi";int k;fun(a) ;puts 以下程序的输出结果是_______。 #include<string.h> main() {char*a="abcdefghi";int k; fun(a) ;puts(a) ; } fun(char *s) { int x,y; char c; for(x=0,y=strlen(s)-1; x<y; x++,y--) { c=s[y]; s[y]=s[x];s[x]=c;} }A.ihgfedcbaB.abcdefghiC.abcdedcbaD.ihgfefghi

有以下程序 void swap(char* x,char *y) {char t; t= *x; *X= *y; *y=t; } main() {char*s1:"abc",*s2="123"; swap(s1,s2);printf("%s,%s\n",s1,s2); } 程序执行后的输出结果是A.123,abcB.abc,123C.1bc,a23D.321,cba

下面程序输出的结果是()。includeusing namespace std;int fuc (char *x);int main(){ 下面程序输出的结果是( )。 #include<iostream> using namespace std; int fuc (char *x); int main(){ cout<<fuc("hello")<<endl; return 0; } int fuc(char *x){ char *y=x; while(*y! ='\0')y++; return(y-x); }A.5B.6C.0D.语法错误,不能输出结果

有以下程序:include void swap(char * x,ehar * y){ char t;t= *x; *x: *y; *y=t;main 有以下程序:#include <stdio.h>void swap(char * x,ehar * y){ char t; t= *x; *x: *y; *y=t;main ( ){ char *s1 ="abc", * s2 ="123"; swap(s1 ,s2); printf("%s,%s \n" ,s1 ,s2);}程序执行后的输出结果是( )。A.123,abeB.abe,123C.1bc,a23D.321,cba

以下程序的输出结果是______。 include main() { char*a="abcdefghi";int k fun(a);p 以下程序的输出结果是______。 #include <string.h> main() { char*a="abcdefghi";int k fun(a);puts(a); } fun(char*s) { int x,y; char c for(x=0,y=strlen(s)-1;x<y:x++,y--) {c=s[y];s[y]=s[x];s[x]=c;} }A.ihgfedcbaB.abcdefghiC.abcdedebaD.ihgfefghi