In the program below, the function "func1" operates on 2-D array of integers. The memory is allocated in the "main".
#define ROW (3)
#define COL (4)
#define ARRAY_SIZE (ROW*COL)
void func1(int matrix[][COL])
{
/* Matrix operation */
}
int main()
{
int * matrix = (int*)malloc(sizeof(int)*ARRAY_SIZE);
/* Call the array operation function func1 */
/* func1(----------------);*/
/* Do other computations */
free (matrix);
return 0;
}
Fill in the blank. (How do you call the func1?)
func1(------------------);
#define ROW (3)
#define COL (4)
#define ARRAY_SIZE (ROW*COL)
void func1(int matrix[][COL])
{
/* Matrix operation */
}
int main()
{
int * matrix = (int*)malloc(sizeof(int)*ARRAY_SIZE);
/* Call the array operation function func1 */
/* func1(----------------);*/
/* Do other computations */
free (matrix);
return 0;
}
Fill in the blank. (How do you call the func1?)
func1(------------------);