In your example int a[10]
no, it is never more practical to write 0[a]
.
FredOverflow links to an example, but it's a bit of a struggle to extract the reason from the comments. So I'll add it as an answer.
a[0]
and 0[a]
are not necessarily equivalent if a
can be any expression (or for example a macro argument) rather than a simple name.
Suppose a
expands to b + 1
. Then b + 1[0]
is not at all the same thing as 0[b + 1]
.
To cover this awkward case, you could ask whether it's more practical to use 0[a]
instead of (a)[0]
. To which the answers is still no. Unless maybe you favour brevity over familiarity.
A macro can expand to contain un-matched brackets, like #define a x]+0[x
or something, so the two still aren't strictly equivalent in all cases. But if a
is an expression then 0[a]
and (a)[0]
are equivalent.