## Address of the First Element of Two Dimensional Array

Program Program Source #include <stdio.h> int main() { int num[3][3]={{10,20,30},{40,50,60},{70,80,90}}; printf(“Address of the First element is %d\n”,num); printf(“Address of the First element is %d\n”,num[0]); printf(“Address of the First element is %d\n”,&num[0][0]); return 0; }

## Scanf to Read Data into Two Dimensional Array

Program Program Source #include <stdio.h> int main() { int number[3][3]; int i,j; for(i=0;i<3;i++) { for(j=0;j<3;j++) { scanf(“%d”,&number[i][j]); } } printf(“Entered Values\n”); for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“%d “,number[i][j]); } printf(“\n”); } return 0; }

## Two Dimensional Array Row Size will be Define Automatically

If you do not specify two dimensional array ‘row size'(Initialization time only), size will be assigned automatically. Program Program Source #include <stdio.h> int main() { int number[][3]={{1,2,3},{4,5,6},{7,8,9}}; printf(“%d”,sizeof(number)); return 0; }

## Two Dimensional Arrays Size

Program Program Source #include < stdio.h > int main() { int a[3][3]={{10,20,30},{40,50,60},{70,80,90}}; printf(“%d\n”,sizeof(a)); printf(“%d\n”,sizeof(a[0])); printf(“%d\n”,sizeof(a)/sizeof(int)); printf(“%d\n”,sizeof(a[0])/sizeof(int)); return 0; }