单项选择题

以下程序运行后的输出结果是
#include<stdio.h>
int f(int x)
int y;
if(x==0 ‖ x==1) return(3);
y=x*x-f(x-2);
return y;
main( )
int z;
z=f(3);printf("%d\n",z);

A.0
B.9
C.6
D.8
<上一题 目录 下一题>
热门 试题

单项选择题
以下程序运行后的输出结果是 #include<stdio.h> main( ) int x=1,y=0,a=0,b=0; switch(x) case 1: switch(y) ease 0:a++;break; ease 1:b++;break; ease 2:a++;b++;break; case 3:a++:b++: printf( a=%d,b=%d n ,a,b);
A.a=1,b=0
B.a=2,b=2
C.a=l,b=1
D.a=2,b=1
单项选择题
以下程序运行后的输出结果是 #include<stdio.h> #include<string.h> void fun(char *s[],int n) char *t;int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j]))t=s[i];s[i]=s[j];s[j]=t; main( ) char *ss[]= bcc , bbcc , xy , aaaacc , aabce ; fun(ss,5);printf( %s,%s n ,ss[0],ss[4]);
A.xy,aaaace
B.aaaacc,xy
C.bcc,aabcc
D.aabcc,bcc
相关试题
  • 以下程序运行后的输出结果是 #include<s...
  • 以下程序运行后的输出结果是 #include<s...
  • 结构化程序设计的基本原则不包括
  • 以下定义语句中正确的是
  • 设有定义语句int( * f)(int);,则...