#include<stdio.h>
main()
{char *s=(“ABC);
do
{printf(“%d”,*s%10);s++;
}while(*s);
}
注意,字母A的ASCII码值为65。程序运行后的输出结果是
A.)5670 B)656667 C)567 D)ABC
[单选题]有以下程序:include<stdio.h>main( ){ char a[20],b[20],c[20];scanf("%s%s",a,b);gets(c);printf("%S%S%s/n",a,b,c);}程序运行时从第一列开始输入:This is a cat!<回车>则输出结果是( )。A.Thisisacat!B.Thisis aC.Thisis a cat!D.Thisisa cat !
[单选题]有以下程序:include<stdio.h>main( ){char s[]={"012xy"};int i,n=o;for(i=0;s[i]!=&39;0&39;;i++)if(s[i]>=as[i]<=z)n++;printf("%d/n",n);}程序运行后的输出结果是( )。A.0B.2C.3D.5
[单选题]有以下程序#include<stdio.h>main(){char s[]=“012xy\08s34f4w2”;int i,n=0:for(i=0;s[i]!=0;i++)if(s[i]>=‘0’&&s[i]<=‘9’)n++:printf(“%d\n”,n):}程序运行后的输出结果是A.0B.3C.7D.8
[单选题]有以下程序#include<stdio.h>main( ){char s[]=“rstuv”;printf(“%c\n”,*s+2);}程序运行后的输出结果是( )。A.tuvB.字符t的ASCII码值C.tD.出错
[单选题]有以下程序:include<stdio.h>main( ){ char a[5][10]={"one","tw0","three","four","five"};int i,j;char t: 、for(i=0;i<4;i++)for(j=i+1;j<5;j++)if(a[i][O]>a[j][0]){t=a[i][O];a[i][O]=a[j][O];a[j][O]
[单选题]有以下程序:include<stdio.h>main( ){char s[]="012xy/O8s34f4w2‘;int i;n=0; ,for(i=0;s[i]!=0;i++)if(s[i]>=0s[i]<=9)n++;printf("%d/n",n);}程序运行后的输出结果是( )。A.0B.3C.7D.8
[单选题]有以下程序#include<stdio.h>main(){char s[]=“012xy\08s34f4w2”;int i,n=0:for(i=0;s[i]!=0;i++)if(s[i]>=‘0’&&s[i]<=‘9’)n++:printf(“%d\n”,n):}程序运行后的输出结果是A.0B.3C.7D.8
[单选题](21)有以下程序#include <stdio.h>main(){ char s[]="012xy/08s34f4w2";int i,n=0;for(i=0;s[i]!=0;i++)if(s[i]>='0'&&s[i]<='9') n++;printf("%d/n",n);}程序运行后的输出结果是A.)0B.)3C.)7D.)8
[单选题]有以下程序:include<stdio.h>main( ){char ch[3][5]={"AAAA","BBB","CC"};printf("%s/n",ch[l]);}程序运行后的输出结果是( )。A.AAAB.CCC.BBBCCD.BBB
[单选题]有以下程序:include<stdio.h>main( ){ char*s="[2]34";int k=0,a=0;whil(s[k+1]!=/0){ k++;if(k%2=o){a=a+(s[k]-0+1);continue; }a=a+(s[k]-0);printf("k=%d a=%d/n",k,a);}程序运行后的输出结果是( )。A.k=6 a=11B.k=3 a=14C.k=4 a=12D.k=5 a=15