已知大写字母A的ACSⅡ码为65,以下程序的运行结果是 ( ) # include<stdio.h> main( ) {char c1='A',c2='Y'; printf("%d,%d\n",c1,c2); }
A.65,89
B.A,Y
C.65,88
D.65,90
第1题:
已知在ASCⅡ代码中,字母A的序号为65,以下程序的输出结果是______。 #include<stdio.h> main() { char c1='A',c2='Y'; printf("%d,%d\n",c1,c2); }
A.65,90
B.因输出格式不合法,输出错误信息
C.A,Y
D.65,89
第2题:
下面程序的输出结果是( )。 include<stdio.h> main() {static char a[]="china"; char*ptr=a; while(*ptr) {printf("%c",*ptr-32); ptr++; } }
第3题:
下列程序的运行结果是( )。
#include<stdio.h>
#include<string.h>
main()
{ char*s1="abDuj";
char*s2="ABdUG";
int t;
t=strcmp(s1,s2) ;
printf("%d",t);
}
A.正数
B.负数
C.零
D.不确定的值
第4题:
有以下程序 #include <stdio.h> void fun(char **p) { ++p; printf("%s\n",*p); } main() { char *a[]={"Moming","Afternoon","Evening","Night"}; fun(a); } 程序的运行结果是
A.Afternoon
B.fternoon
C.Morning
D.orning
第5题:
有以下程序
include<stdio.h>
main()
{ char c1,c2;
scanf("%c",*c1);
while(c1<65||c1>90) scanf("%c",&c1);
c2=c1+32;
printf("%c,%c\n",c1,c2);
}
程序运行输入6回车后,自否输出结果、结束运行(请回答能或不能)【 】。
第6题:
有以下程序 #include <stdio.h> main() { char a=4; printf("%d/n,a=a<<1); } 程序的运行结果是______。
A.40
B.16
C.8
D.4
第7题:
有以下程序:#include <stdio.h>main( ){ char P[] = {'a','b','c'} ,q[]: "abc"; printf( "% d % d \ n", sizeof(p), sizeof(q) );}程序运行后的输出结果是( )。
A.44
B.33
C.34
D.43
第8题:
有以下程序,程序运行的结果是 ______。 #include<iostream.h> #include<string.h> void main(){ char x[]= "C++" ,y[10]= "C++" ; cout<<sizeof(x)/sizeof(char)<<“,”<<sizeof(y)/sizeof(char); }
A.3 3
B.4 4
C.4 10
D.10 10
第9题:
有以下程序:#include <stdio.h>void swap(char * x,ehar * y){ char t; t= *x; *x: *y; *y=t;main ( ){ char *s1 ="abc", * s2 ="123"; swap(s1 ,s2); printf("%s,%s \n" ,s1 ,s2);}程序执行后的输出结果是( )。
A.123,abe
B.abe,123
C.1bc,a23
D.321,cba
第10题:
有以下程序: #include <stdio.h> void fun(char *a, char *b) { a=b; (*a)++;} main() { char c1='A',c2='a',*p1,*p2; p1=&c1; P2=&c2; fun(p1,p2); printf("%c%c\n",c1,c2); } 程序运行后的输出结果是( )。
A.Ab
B.aa
C.Aa
D.Bb
第11题:
输出格式不合法,输出出错信息
A,Y
65,90
65,89
第12题:
BY
BT
YT
YE
第13题:
以下程序运行后的输出结果是【 】
include <stdio.h>
main ( )
{ char a[] ="123456789", *p;
int i =0;
p=a;
while( * p)
{ if(i%2 ==0) *p='*';
p++;i++;
}
puts(a);
}
第14题:
有以下程序: #include <stdio.h> main() {int y=9; for( ; y>0; y--) if(y%3==0) printf("%d", --y); } 程序的运行结果是( )。
A.741
B.963
C.852
D.875421
第15题:
有以下程序 #include <stdio.h> main() { int y=9; for( ; y>0; y--) if(y%3==0) printf("%d",--y); } 程序的运行结果是
A.741
B.963
C.852
D.875421
第16题:
有以下程序: #include <stdio.h> main( ) { char s[ ] ="159" , * p; p=s; printf( "% c", * p + + ); printf("%~", * p++);}程序运行后的输出结果是( )。
A.15
B.16
C.12
D.59
第17题:
以下程序的输出结果是【 】。
include<stdio.h>
main()
{ struct stru
{ int a;
float b;
char d[4];
};
printf("%d\n",sizeof(struct stru));
}
第18题:
下面程序的运行结果是 ( ) # include<stdio.h> # include<string.h> main( ) { char * a="AbcdEf",* b="aBcD" a + +;b + +; printf("%d\n",strcmp(a,b)); }
A.0
B.负数
C.正数
D.无确定值
第19题:
已知大写字母F的ASCII码为70,以下程序的运行结果为 ( ) #include<stdio.h> main( ) { char c1='F',c2='p'; printf("%d,%d\n",c1,c2); }
A.70,80
B.70,81
C.70,82
D.70,83
第20题:
有以下程序: #include <stdio.h> char fun(char x,char y) { if(x<y) return x; return y; } main() { int a='9',b='8',c='7'; printf("%c\n",fun(fun(a,b),fun(b,c))); } 程序的执行结果是( )。
A.函数调用出错
B.8
C.9
D.7
第21题:
已知在ASCII代码中,字母A的序号为65,下列程序的输出结果是______。#include <stdio.h>main (){ char c1='A',c2='Y'; printf("%d,%d\n",c1,c2);}
A.因输出格式不合法,输出错误信息
B.65,90
C.'A','Y'
D.65,89
第22题:
已知在ASCII代码中,字母A的序号为65,以下程序的输出的结果是() #include
第23题:
因输出格式不合法,输出错误信息
65,90
A、Y
65,89