如果有以下语句:int a,b; scanf(“a=%d/b=%d”,&a,&b);则下列输入数据的方式中能把10、20、分别正确输入到a、b中的是( C )。A.10,20 B.1020 C.a=10/b=20 D.D.a=10, b=20
A. 10,20
B. 1020
C. a=10/b=20
D. a=10, b=20
查看答案
下面程序的功能是在a数组中查找与x值相同的元素所在位置,请填空。 #include void main() { int a[10],i,x; printf(“input 10 integers:”);for(i=0;i<10;i++) scanf(“%d”,&a[i]); printf(“input the number you want to find x:”); scanf(“%d”,______ ); for(i=0;i<10;i++) if(______ )break; if(______ ) printf(“the pos of x is:%d\n”,i); else printf(“can not find x!\n”); }
从键盘输入一个字符,判断它是否是英文字母。 #include void main(){char c; printf("input a character:"); c=getchar();if(c>=______ &&c<=______ || c>=‘a’ &&c<= ‘z’) printf("Yes\n"); else printf("No");}
若有定义int a[5];则*(a+3)和a[3]代表相同含义 ( )
A. 正确
B. 错误
设变量x,y,a,b,c,d的均值为2,计算表达式(x=a!=b)&&(y=c!=d)后,变量x,y的值分别是( )。
A. 0,0
B. 0,2
C. 1,0
D. 1,1