In C/C++, initialization of a multidimensional arrays can have left most dimension as optional. Except the left most dimension, all other dimensions must be specified.
For example, following program fails in compilation because two dimensions are not specified.
Following 2 programs work without any error.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Write one line functions for strcat() and strcmp()
- Arrays in C/C++
- What’s difference between char s and char *s in C?
- How to print size of array parameter in C++?
- What is the difference between single quoted and double quoted declaration of char array?
- Program to Find the Largest Number using Ternary Operator
- Passing Reference to a Pointer in C++
- How to avoid Structure Padding in C?
- wcrtomb() function in C/C++
- vswprintf() function in C/C++