单项选择题

下面程序
main()
int x=100,a=10,b=20,okl=5,ok2=0;
if(a<B)
if(b!=15)
if(!ik1) x=1;
else if(ok2)x=10;
x=-1;
printf("%d\n",x);

的输出是______。
A) -1 B) 0 C) 1 D) 不确定的值

<上一题 目录 下一题>
热门 试题

单项选择题
下列程序的运行结果为( )。 #include<stdio.h> void abc(char*str) int a,b,i,j; for(i=j=0;str[i]!=' 0';i++) if(str[i]!='a') str[j++]=str[i]; str[j]=' 0'; void main() char str[]= abcdef ; abc(str); printf( str[]%s ,str);
A) str[]=bcdef
B) str[]=abcdef
C) str[]=a
D) str[]=ab
单项选择题
有以下程序: #include<stdio.h> main() int a[]=2,3,5,4,i; for(i=0;i<4;i++) switch(i%2) case0:switch(a[i]%2) case0:a[i]++;break; case1:a[i]--; break; case1: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> f(in...
  • 有以下程序: #include <stdio.h> m...
  • 有以下程序: #include <stdio.h> f...
  • 有以下程序:#include <stdio.h>fun(...
  • 有以下程序:#include <stdio, h>#i...