内容发布更新时间 : 2025/6/13 23:53:08星期一 下面是文章的全部内容请认真阅读。
.
内部直接或间接调用该函数成为函数( 递归调用 )的调用方式。
4.C语言变量按其作用域分为( 局部 )和( 全局 )。按其生存期分为(动态 )和(静态 )。 5.下列程序的输出结果是( 48 )。 #define N 3
#define Y(n) ((N+1)*n)
void main(){ printf(“%d\\n”,2*(N+Y(5+1))); }
6.C语言变量的存储类别有( 自动 ),( 静态 ),( 外部 )和( 寄存器 )。 7.下列程序的输出结果是( 20 )。 #define MIN(x,y) (x)<(y)?(x):(y) void main() { int i,j,k; i=10;j=20;
k=10*MIN(i,j);
printf(“%d\\n”,k); }
8.以下程序的输结果是( 9.0 ) #include
double sub(double x,double y,double z) { y-=1.0; z=z+x;
return z; } void main()
{ double a=2.5,b=9.0;
printf(“%f\\n”,sub(b-a,a,a)); } 9.以下程序的输出结果是( 2 4 6 ) #include
{ static int a=0;
a+=2; pringf(“]”,a) ; } void main() { int cc;
for(cc=1;cc<4;cc++) fun();
printf(“\\n”); }
10.下列程序的输出结果是( 56 ) #include
int t(int x,int y,int cp,int dp) { cp=x*x+y*y; dp=x*x-y*y; }
.
.
void main()
{ int a=4,b=3,c=5,d=6; t(a,b,c,d)};
printf(“%d%d\\n”,c,d); }
11.下面程序的运行结果是( 10 ) #include
printf(“%d\\n”,x); } func(int x) { x=20; }
12.在C语言中,一个函数一般由两个部分组成他们是(函数首部)和( 函数体 13.下面程序的运行结果是( A+B=9 ) #include
{ int a=4,b=5,c; c=plus(a,b);
printf(“A+B=%d\\n”,c); } plus(int x,int y) { int z; z=x+y;
return(z); } 三、读程序写结果
1.下述程序的输出结果是( 9 )。 #include
if(n==1||n==2) s=2; else
s=n+fun(n-1); return s; } void main()
{