单项选择题

有以下程序:
main()
int a=1, b;
for(b=1; b<=10; b++)
if(a>=8)break;
if(a % 2==1)a+=5; continue;
a-=3;

printf("% d\n", B) ;
程序运行后的输出结果是______。

A.3
B.4
C.5
D.6
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: void swapl(int c0[], int c1[]) int t; t=co[o]; co[o]=o1[o]; c1[o]=t; void swap2(int * c0, int * c1) int t; t=*c0; *c0=*c1; *c1=t; main() int a[2]=3, 5, b[2]=A3, 5); swapl(a, a+1); swap2(&b[0], &b[1]); printf( %d%d%d%d n , a[0], a[1], b[0],b[1]); 程序运行后的输出结果是______。
A.3 5 5 3
B.5 3 3 5
C.3 5 3 5
D.5 3 5 3
单项选择题
以下程序中函数setup的功能是返回形参指针s1和s2所指字符串中较小字符串的首地址: # include<stdio. h> # include<string. h> char * scmp(char * s1, char * s2) if(strcmp(s1, s2)<0) return(s1); else return(s2); main() int i; char string[20], str[3][20]; for(i=0; i<3; i++)gets(str[i]); strcpy(string, scmp(str[0], str[1])); strcpy(string, scmp(string, str[2])); printf( % s n , string); 若运行时依次输入:abcd、abba和abc3个字符串,则输出结果为______。
A.abcd
B.abba
C.abc
D.abca
相关试题
  • 以下程序中函数setup的功能是返回形参指针s...
  • 有以下程序: void swapl(int c0[]...
  • 有以下程序: int f(int n) if(n=...
  • 程序中对fun函数有如下说明: void * f...
  • 以下程序的输出结果是______。 long...