以下程序的输出结果是:main() { int a=12,b=12; printf(“%d %d ”,--a,b++); }
A: 10 11
B: 11 13
C: 11 10
D: 11 12
A: 10 11
B: 11 13
C: 11 10
D: 11 12
举一反三
- 有以下程序段:#include int main(){int x[ ] = {10, 20, 30}; int *px = x;printf("%d, ", ++*px); printf("%d, ", *px); px = x;printf("%d, ", (*px)++); printf("%d, ", *px); px = x;printf("%d, ", *px++); printf("%d, ", *px); px = x;printf("%d, ", *++px); printf("%d\n", *px);return 0;}程序运行后的输出结果是( ) A: 20, 10, 11, 10, 11, 10, 11, 10 B: 11, 11, 11, 12, 12, 20, 20, 20 C: 20, 10, 11, 20, 11, 12, 20, 20 D: 11, 11, 11, 12, 12, 13, 20, 20
- 有以下程序段:#include stdio.hint main(){int x[ ] = {10, 20, 30}; int *px = x;printf(%d, , ++*px); printf(%d, , *px); px = x;printf(%d, , (*px)++); printf(%d, , *px); px = x;printf(%d, , *px++); printf(%d, , *px); px = x;printf(%d, , *++px); printf(%d\n, *px);return 0;}程序运行后的输出结果是( )。 A: 11, 11, 11, 12, 12, 20, 20, 20 B: 20, 10, 11, 10, 11, 10, 11, 10 C: 11, 11, 11, 12, 12, 13, 20, 20 D: 20, 10, 11, 20, 11, 12, 20, 20
- 下列程序的输出结果是()。int main(){ int a=11; printf("%d\n",a++); return 0;} A: 12 B: 11 C: 10 D: 9
- 下列程序运行的结果是main(){inta=10,b=11,c=12;printf("%d",ab:b);} A: 11 B: 0 C: 10 D: 12
- 执行如下语句后,x的值和输出结果分别是 ________。 int x=11; printf("%d", x+2); A: 11 11 B: 12 12 C: 11 13 D: 12 13