Please consider the following piece of code
#include <stdio.h>
#define ROW_SIZE 2
#define COL_SIZE 2
int main()
{
int a[ROW_SIZE][COL_SIZE]={{1,2},{3,4}};
// Base address:Pointer to the first element a 1D array
printf("Base address of array:%p\n",a);
//The value at the base address: should be the address of 1st 1D array
printf("Value at the Base address:%p\n",*a);
return 0;
}
Output obtained:
Sample Output:
Base address of array:0xbff77434
Value at the Base address:0xbff77434
Somehow, I am failing to understand the concept of the base address of a 2D array and the value at the base address which is inturn an address to a 1D array being same. Please explain.
