单项选择题

若有如下程序:
sub(int x)
int y=0; static int z=1;
y+=x+2;z+=y+x;
return(z);
main()
int t=1,n;
for(n=0;n<3;n++)printf("%d,",sub(t));
则程序运行后的输出结果是 ( )

A.5,5,5
B.5,9,13,
C.5,7,9,
D.5,8,11,
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序 union myun struct int x,y,z;u; int k; a; main() a.u.x=4;a.u.y=5;a,u.z=6; a.k=0; printf( %d n ,a.u.x); 程序运行后的输出结果是 ( )
A.4
B.5
C.6
D.0
单项选择题
有以下程序 并include<stdio.h> #include<string.h> fun(char * w,int n) char t,*s1,*s2; s1=w; s2=w+n-1; while(s1<s2) t=*s1++; * s1=*s2--; * s2=t; main() char p[]= 1234567 ; fun(p,strlen(p)); puts(p); 程序运行后的输出结果是 ( )
A.1234567
B.7654321
C.1711717
D.7177171
相关试题
  • 有以下程序 #include<stdio.h> main...
  • 设有如下程序: #include string.h ma...
  • 有以下程序: #include <stdlib.h> ...
  • 以下程序的输出结果是 ( ) void fun...
  • 有以下程序 main() int m,n; print...