I have heard of a table true false for C Language for and && or || is kind of the mathematics one for which they say if true+true=true and false+true=false
I'm just kind of confuse on this and I tried to do the research but couldn't find any of the table
I just wish to have this table for my notes since I will do more in C language
if someone could bring me to the site or resources where they explain about this more
I've edited my original question to make it a note for my own study. Thanks @thiton for the great references and the rest for an awesome answer/resources.
Logical AND (&&)
false && false: false
false && true: false
true && false: false
true && true: true
Logical OR (||)
false || false: false
false || true: true
true || false: true
true || true: true
Logical NOT (!)
!false: true
!true: false
As we can see, the result is always true except for the case when both operands are false . If an operand is not a boolean, it's converted to a boolean for the evaluation. Most of the time, OR || is used in an if statement to test if any of the given conditions is true .
therefore In Boolean algebra True + False=1+0=1.
Whenever an integer value is tested to see whether it is true of false, 0 is considered to be false and all other integers are considered be true. Operators !, && and || always yield either 0 or 1. For example, expression 3 && −2 yields true.
What does true or false mean? True or false is variously said of something that must be considered as correct (true) or incorrect (false).
You probably mean a truth table for the boolean operators, which displays the result of the usual boolean operations (&&, ||). This table is not language-specific, but can be found e.g. here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With