Some doubts in the array when it is passed as an arguement

  1. Inside the main function, Prateek Bhaiya has declared the array as a[10][10], then why has he designed the functions like readmatrix, printmatrix with argument as a[][10] ? Why not he wrote a[10][10] ?
  2. Also in the function like readmatrix or printmatrix, why is there no any asterik(*)before the names of the array ?

Hi Ravi,

  1. while passing 2d arrays to a function, both a[10][10] and a[ ][10] are valid syntax.
  2. arrays are passed by reference by deault, so you dont to add * before the argument names.
    I hope have cleared your doubt, Please mark it as resolved if you are satisfied.

I was very much stressed due to the doubts that I asked you. But now , My doubts have been cleared. Thank you so much Mam.

Please mark your doubt as resolved if you are satisfied. You can always re-open it if required.

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.