Feb
6
awarded Great Answer
Jan
8
awarded Good Answer
Dec
28
awarded Reversal
Dec
13
awarded Nice Answer
Dec
10
awarded Nice Answer
Dec
7
awarded Yearling
Dec
7
awarded Yearling
Nov
28
comment Why printf() is not used when scanf returns negative number?
@Transcendental: I believe, on windows consoles, Ctrl+Z is the magic incantation to put an end-of-file in standard input, like Ctrl+D often does in linux terminals.
Nov
27
comment How to convince my student that this is an Identity : $\sec^2x-\tan^2x=1$?
@Benoit: While true, keep in mind that implicit contexts like $x$ being of real number type are very broadly applied. If you make the assumptions explicit all the time, you just make the exceptions less memorable (as well as increase cognitive load). Yes, it's good to know that they are making background assumptions, but they generally belong in the background. If you really want to push that line of thought to the extreme, note that $\cos$ and $\sin$ are things whose meanings might vary in different contexts too. (for that matter, the same goes for exponentiation, $+$, $2$, $1$, and even $=$)
Nov
27
comment In what way does this struct-field-aliasing code invoke Undefined Behavior
@Anders: IMO, the reason why the 20 line program shouldn't work is obvious, due to playing fast and loose with types; dragging out the 600 page standard is only needed to confirm there isn't some technicality that implies it really should work after all.
Nov
27
answered How to convince my student that this is an Identity : $\sec^2x-\tan^2x=1$?
Nov
27
answered Vector of pointers Efficient/Correct Iteration
Nov
27
answered Is SSE redundant or discouraged?
Nov
26
awarded Nice Answer
Nov
26
comment Is Honesty always the best policy? What could go wrong if a society valued honesty over every other virtue?
@Emmanuel: IMO, that's more about the expectation that people are supposed to lie; the reaction to the truth is, to some extent (IMO a very large extent), about the fact you didn't play the charade,
Nov
26
comment const-reference qualified member function
Aside: not all r-value references are temporaries.
Nov
26
answered [] Operator overloading for get and set operation in c++
Nov
26
comment Trivial Fundamental Group Notation (1 or 0)
I've even seen an exact sequence with $1$ at the left end and $0$ at the right end, because the left group was typically thought of multiplicatively and the right one additively.
Nov
25
answered Unfounded multiple downvotes and close requests
Nov
25
comment C++: Rounding up to the nearest multiple of a number
num - 1 - (num - 1) % factor + factor does the same calculation without the risk of integer overflow.
1 2 3 4 5