The GNU C Programming Tutorial - Questions 18
- Hidden operators can be used in return statements, for example,
Would there be any point in writing the following?
- What distinguishes a bit string from an ordinary variable? Can any
variable be a bit string?
- What is the difference between an inclusive OR operation and an
exclusive OR operation?
- Find out what the decimal values of the following
7 & 2
1 & 1
15 & 3
15 & 7
15 & 7 & 3
Try to explain the results. (Hint: sketch out the numbers as bit strings.)
- Find out what the decimal values of the following operations are.
1 | 2
1 | 2 | 3
- Find out the decimal values of the following operations.
(Hint: write a short program to work them out.)
1 & (~1)
23 & (~23)
2012 & (~2012)