单项选择题
有以下程序:
#included<stdio.h>
main()
{char s[]={"012xy"}; int i, n=0;
for(i=0; s[i]!=0; i++)
if(s[i]>="a"&&s[i]<="z")n++;
printf("%d\n", n);
}
程序运行后的输出结果是______。
A.0
B.2
C.3
D.5
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序#include<stdio.h>main(){int a[]={2, 3, 5, 4}, i;for(i=0; i<4; i++)switch(i%2){ case 0: switch(a[i]%2){case 0: a[i]++; break; case 1: a[i]--;}break;case 1: a[i]=0;}for(i=0; i<4; i++)printf( %d , a[i]); printf( n );}程序运行后的输出结果是______。
A.3344
B.2050
C.3040
D.0304
点击查看答案&解析
单项选择题
有以下程序:#include<stdio.h>#include<string.h>main(){char str[][20][{ One*World , One*Dream! }, *p=str[1];prinft( %d, , strlen(p)); printf( %s n , p);}程序运行后的输出结果是______。
A.9, One*World
B.9, One*Dream!
C.10, One*Dream!
D.10, One*World
点击查看答案&解析
相关试题
请编写函数proc(),它的功能是计算:s=...
下列给定程序中,函数proc()的功能是:读...
str是一个由数字和字母字符组成的字符串,...
以下叙述中正确的是______。
若有以下程序段:int r=8;print( %d...