// Pantea Aria // static 2D arrays recap // You are given two 2D arrays of integers (table1 and table2) // with the same number of rows and columns. // Write a function called add_tables that: // Takes table1, table2, and result as parameters // Adds the corresponding elements of table1 and table2 // Stores the sum in result // Write a function called print_table that prints a 2D array in grid form. #include #define ROWS 2 #define COLS 3 int main(void) { int table1[ROWS][COLS] = { {1, 2, 3}, {4, 5, 6} }; int table2[ROWS][COLS] = { {7, 8, 9}, {1, 2, 3} }; int sum[ROWS][COLS]; // call function add_tables printf("Table 1\n"); // call function print_table printf("\nTable 2\n"); // call function print_table printf("\nSum Table\n"); // call function print_table