有以下程序 #include main() {unsigned char a=8,c: c=a>>3; printf(“%d\n”,c): } 程序运行后的输出结果是

admin2011-04-29  28

问题 有以下程序  
    #include
    main()
    {unsigned char a=8,c:
    c=a>>3;
    printf(“%d\n”,c):
    }
    程序运行后的输出结果是

选项 A、32
B、16
C、1
D、O

答案C

解析 无符号数a右移3位,高位补0.其过程为a:000011000(a=8,b=a>>    3:00000001(b=1)。
转载请注明原文地址:https://kaotiyun.com/show/9PPp777K
0

相关试题推荐
最新回复(0)