int main()
{
double a[3];
a[1,1]=1;
}
It passes the vs2013 compiler, and it is not 2D array.
In the expression inside square brackets there is so-called comma operator.
a[1,1]=1;
Its value is the value of the last subexpression.
So this statement is equivalent to
a[1]=1;
This syntax as
a[1,1]=1;
is also valid in C# but it sets an element of a two-dimensional array.
In C/C++ each index of a multidimensional array shall be enclosed in separate square brackets.
Here is a more interesting example with the comma operator
int main()
{
double a[3];
size_t i = 0;
a[i++, i++]=1;
}
It is also equivalent to
a[1]=1;