Strangest language feature
language-agnostic, programming-languages
Solution
In C, arrays can be indexed like so:
a[10]
which is very common.
However, the lesser known form (which really does work!) is:
10[a]
which means the same as the above.
Problem
What is, in your opinion, the most surprising, weird, strange or really "WTF" language feature you have encountered? Please only one feature per answer.
Related problems
- How to use double or single brackets, parentheses, curly braces
- How does the C# compiler detect COM types?
- Casting with conditional/ternary ("?:") operator
- Why does 2 == [2] in JavaScript?
- Enum type constraints in C#
- Casting ints to enums in C#
- What is the '-->' operator in C/C++?
- Why doesn't this code simply print letters A to Z?