若有以下程序: #include main( ) { int a=-11,b=10; a/=b/=-4: printf("%d%d\n",a,b); } 则程序的输出结果是( )。

admin2015-08-09  17

问题 若有以下程序:
    #include
    main( )
    {  int a=-11,b=10;
    a/=b/=-4:
    printf("%d%d\n",a,b);
    }
则程序的输出结果是(    )。

选项 A、4  -3
B、-1  -2
C、5  -2   
D、5  -3

答案C

解析 先执行b/=-4,即b=b/-4,结果为-2,然后执行a/=-2,即a=a/-2,结果为5。所以选择C。
转载请注明原文地址:https://kaotiyun.com/show/JLDp777K
0

最新回复(0)