Why you write the size of max column in function defination in case of 2d array

such as function_name(arr[ ] [1000],int rows,int column);
here you give 1000 columns why ???
BUT IN 1D ARRAY
simply function_name(arr[ ] ,int rows,int column);
why you give the max column to the array in function deffination in case of 2d array

In 2-d array we must give the size of max column because array is continuous memory allocation and by giving the size of column compiler understand “from where compiler have to start giving memory to the second row”
for example:

here we see 2nd row start just after 1st row
if we don’t know the no. of column of 1st row then from where we start giving memory to 2nd row that’s why it is necessary to give the size of column

I hope this helps you and
if you have further doubt, feel free to ask

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.