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.
More Related Contents:
- What is Type-safe?
- What is the difference between Type and Class?
- What are “magic numbers” in computer programming?
- What’s the difference between passing by reference vs. passing by value?
- Shortest distance between a point and a line segment
- What’s your most controversial programming opinion?
- What is a callback function?
- Runtime vs. Compile time
- What is the difference between currying and partial application?
- De Morgan’s rules explained
- What is boxing and unboxing and what are the trade offs?
- Code Golf: Number to Words
- Is it OK to use DYLD_LIBRARY_PATH on Mac OS X? And, what’s the dynamic library search algorithm with it?
- Solving “Who owns the Zebra” programmatically?
- How can I find the difference between two angles?
- What’s the point of OOP?
- Acronyms in CamelCase [closed]
- What are the advantages of memory-mapped files?
- What is the best way to replace or substitute if..else if..else trees in programs?
- Shortest distance between two line segments
- What is the difference between IF-ELSE and SWITCH?
- Is Sleep() evil?
- Recursion or iteration?
- How to develop and test an app that sends emails (without filling someone’s mailbox with test data)? [closed]
- Conditional logging with minimal cyclomatic complexity
- While vs. Do While
- Find all complete sub-graphs within a graph
- Why would a language NOT use Short-circuit evaluation?
- Why are leading zeroes used to represent octal numbers?
- What is differential execution?