5 ms·
There's an answer [1] on the linked SO thread (flip to the first page) but basically, the following two lines are equivalent in C: a[10] 10[a] This is becaus
by sootzoo 13y ago
There's an answer [1] on the linked SO thread (flip to the first page) but basically, the following two lines are equivalent in C:
a[10]
10[a]
This is because a[10] is equivalent to (a + 10), and 10[a] is equivalent to (10 + a), as the first comment on this answer explains.
[1] http://stackoverflow.com/questions/1995113/strangest-language-feature/1995156#199515 http://stackoverflow.com/questions/1995113/strangest-languag...