Why can tm_sec in the tm structure range from 0 to 61, suggesting that there can be 62 seconds in a minute?
That’s actually a buglet in the Standard. There can be 61 seconds in a minute during a leap second. It’s possible for there to be two leap seconds in a year, but it turns out that it’s guaranteed that they’ll never both occur in the same day (let alone the same minute). comp.lang.c FAQ list ยท Question 20.34 Q: Here’s a good puzzle: how do you write a program which produces its own source code as output? A: It is actually quite difficult to write a self-reproducing program that is truly portable, due particularly to quoting and character set difficulties. Here is a classic example (which ought to be presented on one line, although it will fix itself the first time it’s run): char*s=”char*s=%c%s%c;main(){printf(s,34,s,34);}”; main(){printf(s,34,s,34);} (This program has a few deficiencies, among other things neglecting to #include
Related Questions
- Is there really a market for passengers to pay ticket prices in the $100,000 and higher range just for a 30 minute suborbital flight?
- Under FHAs Risk-based premium structure, what is the range of upfront mortgage insurance premiums that you will charge?
- Why can tm_sec in the tm structure range from 0 to 61, suggesting that there can be 62 seconds in a minute?