Consider the following C program.
#include
int main () {
int a[4] [5] = {{1, 2, 3, 4, 5},
{6, 7,8, 9, 10},
{11, 12, 13, 14, 15},
{16, 17,18, 19, 20}};
printf("%d\n", *(*(a+**a+2)+3));
return(0);
}
The output of the program is _______.
Correct Answer:
19
Solution:
Given 2D Array: a[4] [5] = {{1,2,3,4,5}, {6,7,8,9,10}, {11,12,13,14,15}, {16,17,18,19,20}};
Hence, *(*(a+**a+2)+3) = 19
Note: In a 2-D array
- *( ) → address of the element
- **( ) → value of the element