#include <stdio.h>

int main(int argc, int *argv[])
{
	int oneD[4] = {1,2,3,4};
	int twoD[2][2] = {5,6,7,8};
	int threeD[2][2][2] = {{{9,10},{11,12}},{{13,14},{15,16}}};
	
	int **twoD2 = (int **) twoD;
	
	//printf("oneD is %d\n", oneD);
	//printf("&oneD[0] is %d\n", &oneD[0]);
	//printf("oneD+1 is %d\n", oneD+1);
	//printf("*(oneD+1) is %d\n", *(oneD+1));
	//invalid - printf("**oneD is %d\n", **oneD);
	//printf("oneD[1] is %d\n", oneD[1]);
	//printf("############################\n");
	
	//printf("twoD is %d\n", twoD);
	//printf("&twoD[0][0] is %d\n", &(twoD[0][0]));
	//printf("&twoD[0][1] is %d\n", &(twoD[0][1]));
	//printf("&twoD[1][0] is %d\n", &(twoD[1][0]));
	//printf("&twoD[1][1] is %d\n", &(twoD[1][1]));
	//printf("twoD[1] is %d\n", twoD[1]); //since twoD[1] == *(twoD +1) and twoD has type int (*)[2].  sizeof(int[][2]) == 8
	//printf("sizeof(int(*)[2]) is %d\n", sizeof(int (*)[2]));
	//printf("*(twoD+1) is %d\n", *(twoD+1));	
	//printf("twoD[1][1] is %d\n", twoD[1][1]);
	//printf("*(&twoD[0][0] + 1*2 + 1) is %d\n", *(&twoD[0][0] + 1*2 + 1));
	//printf("*twoD is %d\n", *twoD);
	//printf("**twoD is %d\n", **twoD);
	//printf("twoD[0] is %d\n", twoD[0]);
	//printf("twoD[5] is %d\n", twoD[5]);
	//printf("############################\n");
	
	//printf("twoD2 is %d\n", twoD2);
	//printf("twoD is %d\n", twoD);
	//printf("twoD2+1 is %d\n", twoD2+1);
	//printf("twoD+1 is %d\n", twoD+1);
	//printf("*twoD2 is %d\n", *twoD2);
	//printf("*twoD2+1 is %d\n", *(twoD2+1)); //since * is 8 bytes it skips 2
	//printf("twoD2+1 is %d\n", twoD2+1);
	//printf("*twoD2+2 is %d\n", *(twoD2+2));
	//printf("twoD2+2 is %d\n", twoD2+2);
	//printf("*twoD2+3 is %d\n", *(twoD2+3));
	//printf("twoD[1][0] is %d\n", twoD[1][0]);
	//printf("twoD2[1][0] is %d", twoD2[1][0]);
	//printf("&twoD2[0][0] is %d\n", &twoD2[0][0]); 
	

}

