I am confused with the 2D array initialization.
What is the difference between
int a[10][10] and int a[ ][10]?
is a[10][] allowed?
Thanks!
I am confused with the 2D array initialization.
What is the difference between
int a[10][10] and int a[ ][10]?
is a[10][] allowed?
Thanks!
hello @ryoojw94
…
int a[10][10] -> here we are declaring 10 x 10 matrix
int a[][10] -> here we are declaring matrix with atmost 10 columns and rows will be retermine by the data that u r using at the time of initilaisation.
in c++ this is not allowed.
one more thing , when we pass 2d array in any function then mentioning column number is mandatory
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.