以下程序的输出结果是________。 #include<stdio.h> mam() { inta,b,d=241; a=d/100%9; b=(-1)&&(-1); printf("%d,%d\n",a,B) ; }
A.6,1
B.2,1
C.6,0
D.2,0
第1题:
以下程序的输出结果是【 】。
include <stdio.h>
main()
{ int j,a[]={1,3,5,7,9,11,13,15},*P=a+5;
for(j=3; j;j-)
{ switch(i)
{ case 1:
case 2: printf("%d",*p++); break;
case 3: printf("%d",* (-p));
}
}
}
第2题:
有以下程序: #include <stdio.h> main() { int a=1,b=2,c=3,x; x=(ab)&c; printf("%d\n",x); } 程序的运行结果是( )。
A.0
B.1
C.2
D.3
第3题:
以下程序的输出结果是 【7】 。
#include "stdio.h"
main()
{int a=065;
printf( "%d\n",--a);
}
第4题:
有以下程序: #include<stdio.h> main() { printf("%d\n",NULL);} 程序运行后的输出结果是( )。
A.0
B.1
C.-1
D.NULL没定义,出错
第5题:
有以下程序
#include <stdio.h>
main( )
{ printf("%d\n",NULL); }
程序运行后的输出结果是
A.0
B.1
C.-1
D.NULL没定义,出错
第6题:
以下程序运行后的输出结果是( )。
include<stdio.h>
main()
{ int a=1, b=7;
do {
b=b/2; a+=b;
} while(b>1);
printf("%d\n",A);
}
第7题:
以下程序的输出结果是 ( ) # include<stdio.h> main( ) { int a,b; for(a=1,b=1,a<=50;a+ +) { if(b>=10) break; if (b%2==1) { b+=2; continue } b+=2; } printf("%d\n",a); }
A.4
B.5
C.6
D.7
第8题:
下面程序:#include“stdio.h“#includestdlib.hfut(int**s,intp[2][3]){**s=p[1][1];}voidmain(){inta[2][3]={1,3,5,7,9,11},*p;p=(int*)malloc(sizeof(int));fut(printf(“%d\n“,*p);getch();}输出结果是()
A、1
B、7
C、9
D、11
第9题:
执行以下程序的输出结果是【 】。
include <stdio.h>
main()
[ int i, n[4]={1};
for(i= 1 ;i<=3 ;i++)
{ n[i]=n[i-1]*2+1; printf("%d",n[i]); }
第10题:
以下程序的输出结果是( )。 #include <stdio.h> #include<string.h> mam() { char b1[8]="abcdefg",b2[8],*pb=b1+3; while(--pb>=b1) strcpy(b2,pB) ; printf("%d\n",strlen(b2)); }
A.8
B.3
C.1
D.7