/* File: types2.c On the importance of being typed. Warning: This file does not compile! */ #include typedef int int_array[3] ; main() { int_array A ; int_array *ptr1 ; int *ptr2, test ; ptr1 = &A ; ptr2 = &A[0] ; printf("ptr1 = %p\n", ptr1) ; printf("ptr2 = %p\n", ptr2) ; A[0] = 7 ; test = *ptr1 ; /* wrong type! */ printf("(*ptr1)[0] = %d\n", test) ; test = (*ptr2)[0] ; /* wrong type! */ printf("*ptr2 = %d\n", test) ; }