spring break

Mar 12, 2004 21:44

Today's link is thanks to arwenn:
It's not the onion, unfortunatelyWe should've let the south secede. At least then we wouldn't have to put up with their idiocy screwing up politics for the rest of us. Be sure to take a look at the second place middle school division ( Read more... )

Leave a comment

Comments 2

fleaplus March 15 2004, 19:10:10 UTC
I actually think the Creation Science Fair might be a hoax, especially since their online store had this interesting product. I also like their mousepad.

Reply


Answers ejtttje February 11 2005, 21:25:21 UTC
For the first snippet, it will print the full string "Hello World\n" twice. That's because printf buffers until the newline is reached, so the first part, "Hello " is still in memory when the fork occurs. Thus, each fork independently adds "World\n", causing the full string to be displayed.

The second has to do with *signed* or *unsigned* values. Since the bit field is marked as int (implying a signed value), setting the bit actually refers to -1, not 1. Thus, the comparison test should be against -1 or 0, because it will always fail against 1. Alternatively, the bit fields should be marked unsigned.

Reply


Leave a comment

Up