Answers 221
Answer 1: The problem is that a large herd contains 10,000 sheep. That’s
40,000 legs. The maximum number you can fit in a
short int is 32,767.
That’s smaller than 40,000, so (10,000*4) causes an overflow that results in
wrong data being output.
Answer 2: The problem is that the statement:
// The bit we are printing now
short int bit = (1<<16);
does not set the variable bit to 1000 0000 0000 0000(b). Instead, it sets it to
1 0000 0000 0000 0000(b). Unfortunately, it can’t hold 17 bits, so the
result ...