简体   繁体   English

在C编程中“ <>”是什么意思? [等候接听]

[英]What does “<>” mean in C programming? [on hold]

我在If语句y<>3看到了这个示例,我想知道它的作用。

I have to check if this exercise is correct 我必须检查这个练习是否正确

It is not. 它不是。

if (((x < y) && (y < z)) && (y != 3))
    printf(“%f < %d < %d \n”, x, y, z);

Is correct, assuming float x and int y, z . 假设float xint y, z是正确的。

<> in some languages means "does not equal". 在某些语言中, <>表示“不相等”。 But in c, the operator is != . 但是在c中,运算符是!= Also note the difference between logical AND ( && ) and bitwise AND ( & ). 还请注意逻辑与( && )与按位与( & )之间的区别。 You should use the logical operators for multiple criteria in a conditional statement. 您应该在条件语句中对多个条件使用逻辑运算符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM