Fun with weird C++
This is maybe something more for some ceremony like the last event before christmas.
Stackoverflow has collected some of the most weird and crazy (mostly operator) constructs of C(++). You quickly find such questions by sorting them by votes: http://stackoverflow.com/questions/tagged/c.
- With C arrays, why is it the case that a5 5[a] ? A: Commutativity of the addition, due to
a[b] *(a + b).
- Which is faster: while(1) or while(2)?
- How many levels of pointers can we have? - or perhaps the question when you didn't understood the concept of pointers
- Classic one: What is the name of the “-->” operator?
- Why doesn't GCC optimize a*a*a*a*a*a to (a*a*a)*(a*a*a)? - did you know: floating point math isn't associative!
- What is “:-!!” in C code?
- Why is processing a sorted array faster than an unsorted array?
- Why is one loop so much slower than two loops?
Please append your proposals!
No data to display