It cannot be "something like this". The syntax that involves two (or more) consecutive empty square brackets [][]
is never valid in C language.
When you are declaring an array with an initializer, only the first size can be omitted. All remaining sizes must be explicitly present. So in your case the second size can be 3
int matrix[][3] = { { 2, 3, 4 }, { 1, 5, 3 } };
if you intended it to be 3. Or it can be 5, if you so desire
int matrix[][5] = { { 2, 3, 4 }, { 1, 5, 3 } };
In other words, you will always already "know" all sizes except the first. There's no way around it. Yet, if you want to "recall" it somewhere down the code, you can obtain it as
sizeof *matrix / sizeof **matrix
As for the first size, you can get it as
sizeof matrix / sizeof *matrix