for( = <ri++printf("\ ")for( = <rj++printf("\ % "mat[ ][ ])output enter the number of rows and columns of the matrix - pointers and two-dimensional arrays consider two-dimensional array declared as int mat[ ][ ]to declare pointer to two-dimensional arrayyou may write int **ptr here int **ptr is an array of pointers (to one-dimensional arrays)while int mat[ ][ is array they are not the same type and are not interchangeable individual elements of the array mat can be accessed using eithermat[ ][jor *(*(mat ijor *(mat[ ]+ )to understand more fully the concept of pointerslet us replace *(multi rowwith so the expression *(*(mat ijbecomes *( colusing pointer arithmeticwe know that the address pointed to by ( value ofx col must be greater than the address col by an amount equal to sizeof(intsince mat is two-dimensional arraywe know that in the expression multi row as used abovemulti row must increase in value by an amount equal to that needed to point to the next rowwhich in this case would be an amount equal to cols sizeof(intthusin case of two-dimensional arrayin order to evaluate expression (for row major array)we must know total of values the address of the first element of the arraywhich is given by the name of the arrayi mat in our case the size of the type of the elements of the arrayi size of integers in our case the specific index value for the row the specific index value for the column note that int (*ptr)[ ]declares ptr to be pointer to an array of integers this is different from int *ptr[ ]which would make ptr the name of an array of pointers to type int you must be thinking how pointer arithmetic works if you have an array of pointers for exampleint arr[ int *ptr arr