February 2014
Beginner
1248 pages
62h 25m
English
Figure 5.19 uses logical operators to produce the truth tables discussed in this section. The output shows the boolean expression that was evaluated and its result. We used the %b format specifier to display the word “true” or the word “false” based on a boolean expression’s value. Lines 9–13 produce the truth table for &&. Lines 16–20 produce the truth table for ||. Lines 23–27 produce the truth table for &. Lines 30–35 produce the truth table for |. Lines 38–43 produce the truth table for ^. Lines 46–47 produce the truth table for !.
Read now
Unlock full access