Functions and Integer Double Dimension Array ================================================== In this section, you are going to learn .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow What are the calling conventions of integer double dimension array ? .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Call by Value .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Call by Reference .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Revisit Basics : :doc:`../../array_n_ptrs/arrays_n_ints/int_dd_array` .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Integer Double Dimension Array : Syntax ` * :ref:`Integer Double Dimension Array : FAQs ` * :ref:`Integer Double Dimension Array : fun(expression) ` * :ref:`Rules for Call By Value ` * :ref:`Example : Call by Value : Pass Integer : a[1][1] ` * :ref:`Example : Call by Value : Pass Integer : **a ` * :ref:`Rules for Call By Reference ` * :ref:`Example : Call by Reference : &a[1][1] ` * :ref:`Example : Call by Reference : a[1] ` * :ref:`Examples of Call by Value ` * :ref:`Example 1 : Call by Value : Pass Integer : a[0][0], a[1][0], a[1][1] ` * :ref:`Example 2 : Call by Value : Pass Integer : **a, *(*(a + 1) + 0), *(*(a + 1) + 1) ` * :ref:`Examples of Call by Reference ` * :ref:`Example 3 : Call by Reference : Pass Single dimension arrays which are part of a double dimension array to a function ` * :ref:`Example 4 : Call by Reference : Pass Address of Single dimension arrays which are part of a double dimension array to a function ` * :ref:`Example 5 : Call by Reference : Pass Address of Double Dimension array to a function ` .. _funcs_n_ptrs_int_dd_array_ex_0_0: .. tab-set:: .. tab-item:: Integer Double Dimension Array : Syntax .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow int array_name[Row][Column]; .. _funcs_n_ptrs_int_dd_array_ex_0_1: .. tab-set:: .. tab-item:: Integer Double Dimension Array : FAQs Consider a integer double dimension array .. code-block:: c int a[3][4]; .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Let us answer few basic questions in this array .. _funcs_n_ptrs_int_dd_array_ex_6: .. tab-set:: .. tab-item:: Integer Double Dimension Array : fun(expression) .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow If ``fun(x)`` is the function call, then ``fun(typeof(x))`` is the prototype / definition ========================== =============================== ========================================================================== Function Call Function Definition Observations ========================== =============================== ========================================================================== fun(a[0][0]) void fun(int x) {} * Call by Value fun(a[1][0]) void fun(int x) {} * Call by Value fun(a[2][0]) void fun(int x) {} * Call by Value fun(&a[0][0]) void fun(int \*p) { } * Call by Reference fun(&a[1][0]) void fun(int \*p) { } * Call by Reference fun(&a[2][0]) void fun(int \*p) { } * Call by Reference fun(\*\*a) void fun(int x) {} * Call by Value fun(\*(\*(a + 1) + 0)) void fun(int x) {} * Call by Value fun(\*(\*(a + 2) + 0)) void fun(int x) {} * Call by Value fun(a[0]) void fun(int \*p) { } * Call by Reference fun(a[1]) void fun(int \*p) { } * Call by Reference fun(a[2]) void fun(int \*p) { } * Call by Reference fun(&a[0]) void fun(int (\*p)[4]) { } * Call by Reference fun(&a[1]) void fun(int (\*p)[4]) { } * Call by Reference fun(&a[2]) void fun(int (\*p)[4]) { } * Call by Reference fun(\*a) void fun(int \*p) { } * Call by Reference fun(\*(a + 1)) void fun(int \*p) { } * Call by Reference fun(\*(a + 2)) void fun(int \*p) { } * Call by Reference fun(a) void fun(int (\*p)[4]) { } * Call by Reference fun(a + 1) void fun(int (\*p)[4]) { } * Call by Reference fun(a + 2) void fun(int (\*p)[4]) { } * Call by Reference fun(&a) void fun(int (\*p)[3][4]) { } * Call by Reference ========================== =============================== ========================================================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Let us understand the reason behind above prototypes ! .. _funcs_n_ptrs_int_dd_array_ex_8: .. tab-set:: .. tab-item:: Rules for Call By Value .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow If Declaration has two dereference operators, and * Expression has two dereference operators [] [], and * Expression does not have ``&`` * then it is call by value .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow If Declaration has two dereference operators, and * Expression has two dereference operators \* \*, and * Expression does not have ``&`` * then it is call by value .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow If Declaration has two dereference operators, and * Expression has two dereference operators \* [ ], and * Expression does not have ``&`` * then it is call by value .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Let us look at examples .. _funcs_n_ptrs_int_dd_array_ex_9: .. tab-set:: .. tab-item:: Example 1 : Call by Value : Pass Integer : a[1][1] * Step 1 : Consider an array .. code-block:: c int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 1 : Declaration has TWO dereference operators [ ] and [ ] * Step 2 : Consider an expression ``a[1][1]`` .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 2 : Expression has TWO dereference operators [ ] and [ ] .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Note : ``[ ]`` and ``*`` are dereference operators .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 3 : Expression DOES NOT have ``&`` operator .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Hence ``a[1][1]`` is Call By Value .. _funcs_n_ptrs_int_dd_array_ex_10: .. tab-set:: .. tab-item:: Example 2 : Call by Value : Pass Integer : \*\*a * Step 1 : Consider an array .. code-block:: c int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 1 : Declaration has TWO dereference operators [ ] and [ ] * Step 2 : Consider an expression ``**a`` .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 2 : Expression has TWO dereference operators \* and \* .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Note : ``[ ]`` and ``*`` are dereference operators .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 3 : Expression DOES NOT have ``&`` operator .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Hence ``**a`` is Call By Value .. _funcs_n_ptrs_int_dd_array_ex_11: .. tab-set:: .. tab-item:: Rules for Call By Reference .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow If Declaration has two dereference operators, and * Expression has two dereference operators [] [] or \* \* or [] \*, and * Expression has & * then it is call by reference * Example : &a[0][0] .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow If Declaration has two dereference operators, and * Expression has one dereference operator [ ] or \*, and * then it is call by reference * Example : &a[0], a[0], \*a .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow If Declaration has two dereference operators, and * Expression has zero dereference operators, and * then it is call by reference * Example : a, &a, a + 1, a + 2 .. _funcs_n_ptrs_int_dd_array_ex_12: .. tab-set:: .. tab-item:: Example 1 : Call by Reference : &a[1][1] * Step 1 : Consider an array .. code-block:: c int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 1 : Declaration has TWO dereference operators [ ] and [ ] * Step 2 : Consider an expression ``&a[1][1]`` .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 2 : Expression has TWO dereference operators \* and \* .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Note : ``[ ]`` and ``*`` are dereference operators .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 3 : Expression has ``&`` operator .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Hence ``&a[1][1]`` is Call By Reference .. _funcs_n_ptrs_int_dd_array_ex_13: .. tab-set:: .. tab-item:: Example 2 : Call by Reference : a[1] * Step 1 : Consider an array .. code-block:: c int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 1 : Declaration has TWO dereference operators [ ] and [ ] * Step 2 : Consider an expression ``a[1]`` .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 2 : Expression has ONE dereference operators .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Note : ``[ ]`` and ``*`` are dereference operators .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 3 : Expression DOES NOT have ``&`` operator .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Hence ``a[1]`` is Call By Reference .. _funcs_n_ptrs_int_td_array_examples_call_by_value: .. tab-set:: .. tab-item:: Examples of Call by Value .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Let us look at examples of Call by Value .. _funcs_n_ptrs_int_dd_array_ex_15: .. tab-set:: .. tab-item:: Example 1 : Call by Value : Pass Integer : a[0][0], a[1][0], a[1][1] * Step 1 : Consider a two dimensional array .. code-block:: c int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; * Step 2 : Pass a[0][0], a[1][0], a[1][1] to a function ``fun`` .. code-block:: c fun(a[0][0]); fun(a[1][0]); fun(a[1][1]); * Step 3 : Define function ``fun`` .. code-block:: c void fun(int c) { printf("c = %d\n", c); c = 99; } * Step 4 : Note that it is call by Value for below reason .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 1 : Declaration has TWO dereference operators [ ] and [ ] .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 2 : Expression has TWO dereference operators [ ] and [ ] .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 3 : Expression DOES NOT have ``&`` operator .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Means changing value of integer inside function DOES NOT affect value of integer in Caller ! * See full program below .. code-block:: c #include void fun(int c) { c = 99; } int main(void) { int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; printf("----- Before call by value -----\n"); printf("a[0][0] = %d\n", a[0][0]); printf("a[1][0] = %d\n", a[1][0]); printf("a[1][1] = %d\n", a[1][1]); fun(a[0][0]); fun(a[1][0]); fun(a[1][1]); printf("----- After call by value -----\n"); printf("a[0][0] = %d\n", a[0][0]); printf("a[1][0] = %d\n", a[1][0]); printf("a[1][1] = %d\n", a[1][1]); return 0; } * Output is as below .. code-block:: c ----- Before call by value ----- a[0][0] = 1 a[1][0] = 10 a[1][1] = 20 ----- After call by value ----- a[0][0] = 1 a[1][0] = 10 a[1][1] = 20 .. _funcs_n_ptrs_int_dd_array_ex_16: .. tab-set:: .. tab-item:: Example 2 : Call by Value : Pass Integer : \*\*a, \*(\*(a + 1) + 0), \*(\*(a + 1) + 1) * Step 1 : Consider a two dimensional array .. code-block:: c int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; * Step 2 : Pass \*\*a, \*(\*(a + 1) + 0), \*(\*(a + 1) + 1) to a function ``fun`` .. code-block:: c fun( **a ); fun( *(*(a + 1) + 0) ); fun( *(*(a + 1) + 1) ); * Step 3 : Define function ``fun`` .. code-block:: c void fun(int c) { c = 99; } * Step 4 : Note that it is call by Value for below reason .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 1 : Declaration has TWO dereference operators [ ] and [ ] .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 2 : Expression has TWO dereference operators \* and \* .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Condition 3 : Expression DOES NOT have ``&`` operator .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Means changing value of integer inside function DOES NOT affect value of integer in Caller ! * See full program below .. code-block:: c #include void fun(int c) { c = 99; } int main(void) { int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; printf("----- Before call by value -----\n"); printf("**a = %d\n", **a); printf("*(*(a + 1) + 0) = %d\n", *(*(a + 1) + 0) ); printf("*(*(a + 1) + 1) = %d\n", *(*(a + 1) + 1) ); fun( **a ); fun( *(*(a + 1) + 0) ); fun( *(*(a + 1) + 1) ); printf("----- After call by value -----\n"); printf("**a = %d\n", **a); printf("*(*(a + 1) + 0) = %d\n", *(*(a + 1) + 0) ); printf("*(*(a + 1) + 1) = %d\n", *(*(a + 1) + 1) ); return 0; } * Output is as below .. code-block:: c ----- Before call by value ----- **a = 1 *(*(a + 1) + 0) = 10 *(*(a + 1) + 1) = 20 ----- After call by value ----- **a = 1 *(*(a + 1) + 0) = 10 *(*(a + 1) + 1) = 20 .. _funcs_n_ptrs_int_td_array_examples_call_by_reference: .. tab-set:: .. tab-item:: Examples of Call by Reference .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Let us look at examples of Call by Reference .. _funcs_n_ptrs_int_dd_array_ex_17: .. tab-set:: .. tab-item:: Example 3 : Call by Reference : Pass Single dimension arrays which are part of a double dimension array to a function * Step 1 : Consider a two dimensional array .. code-block:: c int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow There are 3 single dimension arrays in ``int a[3][4]`` * a[0] * a[1] * a[2] .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow a[0] is also equal to \*a a[1] is also equal to \*(a + 1) a[2] is also equal to \*(a + 2) .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow a[0] is also equal to &a[0][0] a[1] is also equal to &a[1][0] a[2] is also equal to &a[2][0] * Step 2.1 : Method 1 : Pass &a[0][0], &a[1][0], &a[2][0] to a function ``fun`` .. code-block:: c fun( &a[0][0] ); fun( &a[1][0] ); fun( &a[2][0] ); * Step 2.2 : Method 2 : Pass a[0], a[1], a[2] to a function ``fun`` .. code-block:: c fun( a[0] ); fun( a[1] ); fun( a[2] ); * Step 2.3 : Method 3 : Pass \*a, \*(a + 1), \*(a + 2) to a function ``fun`` .. code-block:: c fun( *a ); fun( *(a + 1) ); fun( *(a + 2) ); * Step 3.1 : Define function ``fun`` .. code-block:: c void fun(int *ptr) { } * Step 4 : Note that it is call by Reference. Means contents of single dimension array can be changed inside function ``fun`` .. code-block:: c void fun(int *ptr) { for (int i = 0; i < 4; i++) { printf("ptr[%d] = %d\n", i, ptr[i] ); } } * See full program below .. code-block:: c #include void fun(int *ptr) { for (int i = 0; i < 4; i++) { printf("ptr[%d] = %d\n", i, ptr[i] ); } } int main(void) { int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; printf("Method 1 : Access Single dimension arrays\n"); fun( &a[0][0] ); fun( &a[1][0] ); fun( &a[2][0] ); printf("Method 2 : Access Single dimension arrays\n"); fun( a[0] ); fun( a[1] ); fun( a[2] ); printf("Method 3 : Access Single dimension arrays\n"); fun( *a ); fun( *(a + 1) ); fun( *(a + 2) ); return 0; } * Output is as below .. code-block:: c Method 1 : Access Single dimension arrays ptr[0] = 1 ptr[1] = 2 ptr[2] = 3 ptr[3] = 4 ptr[0] = 10 ptr[1] = 20 ptr[2] = 30 ptr[3] = 40 ptr[0] = 100 ptr[1] = 200 ptr[2] = 300 ptr[3] = 400 Method 2 : Access Single dimension arrays ptr[0] = 1 ptr[1] = 2 ptr[2] = 3 ptr[3] = 4 ptr[0] = 10 ptr[1] = 20 ptr[2] = 30 ptr[3] = 40 ptr[0] = 100 ptr[1] = 200 ptr[2] = 300 ptr[3] = 400 Method 3 : Access Single dimension arrays ptr[0] = 1 ptr[1] = 2 ptr[2] = 3 ptr[3] = 4 ptr[0] = 10 ptr[1] = 20 ptr[2] = 30 ptr[3] = 40 ptr[0] = 100 ptr[1] = 200 ptr[2] = 300 ptr[3] = 400 .. _funcs_n_ptrs_int_dd_array_ex_18: .. tab-set:: .. tab-item:: Example 4 : Call by Reference : Pass Address of Single dimension arrays which are part of a double dimension array to a function * Step 1 : Consider a two dimensional array .. code-block:: c int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow There are 3 single dimension arrays in ``int a[3][4]`` * a[0] * a[1] * a[2] .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Address of single dimension arrays is simply * &a[0] * &a[1] * &a[2] .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * &a[0] is also equal to a * &a[1] is also equal to a + 1 * &a[2] is also equal to a + 2 * Step 2.1 : Method 1 : Pass address of single dimension arrays to a function ``fun`` .. code-block:: c fun( &a[0] ); fun( &a[1] ); fun( &a[2] ); * Step 2.2 : Method 2 : Pass address of single dimension arrays to a function ``fun`` .. code-block:: c fun( a ); fun( a + 1 ); fun( a + 2 ); * Step 3.1 : Define the function ``fun`` .. code-block:: c void fun(int (*ptr)[4] ) { } * Step 3.2 : Define the function ``fun`` to change the contents of single dimension array integer by integer .. code-block:: c void fun(int (*ptr)[4] ) { (*ptr)[0] = 11; (*ptr)[1] = 22; (*ptr)[2] = 33; (*ptr)[3] = 44; } * See full program below .. code-block:: c #include void fun(int (*ptr)[4] ) { (*ptr)[0] = 11; (*ptr)[1] = 22; (*ptr)[2] = 33; (*ptr)[3] = 44; } int main(void) { int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; printf("----- Before call by referene -----\n"); for (int i = 0; i < 3; i++) { for (int j = 0; j < 4; j++) { printf("a[%d][%d] = %d\n", i, j, a[i][j]); } } //Method 1 : Access Single dimension arrays. Call by reference fun( &a[0] ); fun( &a[1] ); fun( &a[2] ); //Method 2 : Access Single dimension arrays. Call by reference fun( a ); fun( a + 1 ); fun( a + 2 ); printf("----- After call by referene -----\n"); for (int i = 0; i < 3; i++) { for (int j = 0; j < 4; j++) { printf("a[%d][%d] = %d\n", i, j, a[i][j]); } } return 0; } * Output is as below .. code-block:: c ----- Before call by referene ----- a[0][0] = 1 a[0][1] = 2 a[0][2] = 3 a[0][3] = 4 a[1][0] = 10 a[1][1] = 20 a[1][2] = 30 a[1][3] = 40 a[2][0] = 100 a[2][1] = 200 a[2][2] = 300 a[2][3] = 400 ----- After call by referene ----- a[0][0] = 11 a[0][1] = 22 a[0][2] = 33 a[0][3] = 44 a[1][0] = 11 a[1][1] = 22 a[1][2] = 33 a[1][3] = 44 a[2][0] = 11 a[2][1] = 22 a[2][2] = 33 a[2][3] = 44 .. _funcs_n_ptrs_int_dd_array_ex_19: .. tab-set:: .. tab-item:: Example 5 : Call by Reference : Pass Address of Double Dimension array to a function * Step 1 : Consider a two dimensional array .. code-block:: c int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; * Step 2 : Pass Address of Double Dimension array to a function .. code-block:: c fun(&a); * Step 3.1 : Define function ``fun`` .. code-block:: c void fun(int (*ptr)[3][4] ) { } * Step 3.2 : Access and change individual integers inside function ``fun`` .. code-block:: c int data = 100; for (int i = 0 ; i < 3; i++) { for (int j = 0 ; j < 4; j++) { (*ptr)[i][j] = ++data; } } * See full program below .. code-block:: c #include void fun(int (*ptr)[3][4] ) { // Change Individual integers int data = 100; for (int i = 0 ; i < 3; i++) { for (int j = 0 ; j < 4; j++) { (*ptr)[i][j] = ++data; } } } int main(void) { int a[3][4] = { {1, 2, 3, 4}, {10, 20, 30, 40}, {100, 200, 300, 400} }; printf("----- Before call by reference -----\n"); for (int i = 0 ; i < 3; i++) { for (int j = 0 ; j < 4; j++) { printf("a[%d][%d] = %d\n", i, j, a[i][j]); } } fun(&a); printf("----- After call by reference -----\n"); for (int i = 0 ; i < 3; i++) { for (int j = 0 ; j < 4; j++) { printf("a[%d][%d] = %d\n", i, j, a[i][j]); } } return 0; } * Output is as below .. code-block:: c ----- Before call by reference ----- a[0][0] = 1 a[0][1] = 2 a[0][2] = 3 a[0][3] = 4 a[1][0] = 10 a[1][1] = 20 a[1][2] = 30 a[1][3] = 40 a[2][0] = 100 a[2][1] = 200 a[2][2] = 300 a[2][3] = 400 ----- After call by reference ----- a[0][0] = 101 a[0][1] = 102 a[0][2] = 103 a[0][3] = 104 a[1][0] = 105 a[1][1] = 106 a[1][2] = 107 a[1][3] = 108 a[2][0] = 109 a[2][1] = 110 a[2][2] = 111 a[2][3] = 112 .. card:: See Also * Other topics of integer and functions * :doc:`./int` * :doc:`./int_sd_array` * :doc:`./int_dd_array` * :doc:`./int_td_array` * :doc:`./int_sp` * :doc:`./int_dp` * :doc:`./int_tp` * Current Module * :doc:`../funcs_n_ptrs` * Previous Module * :doc:`../../typecasting_n_ptr/typecasting_n_ptr` * Next Module * :doc:`../../memcpy_ptr/memcpy_ptr` * Other Modules * :doc:`../../variable_and_ptr/variable_and_ptr` * :doc:`../../array_n_ptrs/array_n_ptrs` * :doc:`../../malloc_ptr/malloc_ptr` * :doc:`../../const_ptr/const_ptr` * :doc:`../../void_ptr/void_ptr` * :doc:`../../array_of_ptr/array_of_ptr` * :doc:`../../ptr_to_array/ptr_to_array` * :doc:`../../function_ptr/function_ptr` * :doc:`../../pre_incr_ptr/pre_incr_ptr` * :doc:`../../post_incr_ptr/post_incr_ptr` * :doc:`../../pre_decr_ptr/pre_decr_ptr` * :doc:`../../post_decr_ptr/post_decr_ptr`