June 15th, 2013, 06:11 PM
C programming boolean expression
In C programming is a boolean expression an operator?
June 15th, 2013, 06:26 PM
June 15th, 2013, 09:42 PM
thanks I'll take a look at that
June 16th, 2013, 11:31 AM
A boolean expression is an expression that has a value of either true or false. No it is not an operator; it is an expression. An expression has at least one operator, and as many operands as required in the context of the operators used.
A boolean expression generally involves a test for equality or inequality (==, >=, <=, <, >), or boolean operators (&&, ||, !).
Boolean expression are used for example in if, while, do-while, and for-loop expressions.
June 16th, 2013, 12:28 PM
I think the question should be "Are Boolean expression and Boolean operator in C programming ? "
June 17th, 2013, 02:04 AM
A boolean expression is an expression that has relational and/or logical operators operating on boolean variables. A boolean expression evaluates to either true or false.
Relational operators are:
== is identical to
!= is not identical to
< is less than
<= is less than or equal to
> is greater than
>= is greater than or equal to
Relational operators can operate on integers, floats, doubles and even strings (in a lexicographical fashion).
Logical operators are:
! logical negation
&& logical AND
|| logical OR