小编Nil*_*ate的帖子

A> = B> = C中的C运算符?

考虑:

#include<stdio.h>

int main() {
    if (2 >= 1 >= 1)
        printf("1\n");
    if (200 >= 100 >= 100)
        printf("2\n");
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

nyc @ nyc:〜/ PRG $ gcc sample.c

nyc @ nyc:〜/ PRG $ ./a.out 1

为什么即使第二个表达式的计算结果为TRUE,该程序也只打印1?

c

1
推荐指数
2
解决办法
220
查看次数

标签 统计

c ×1