/* ECP: FILEname=fig7_21.c */ /* 1*/ #include /* 2*/ void /* 3*/ PrintSize( int A[ ] ) /* 4*/ { /* 5*/ printf( "Size of formal A[] is %u\n", sizeof( A ) ); /* 6*/ } /* 7*/ main( void ) /* 8*/ { /* 9*/ int A[ ] = { 1, 2, 3, 4, 5 }; /*10*/ printf( "Size of actual A[] is %u\n", sizeof( A ) ); /*11*/ printf( "A has %u elements\n", sizeof( A )/sizeof( A[ 0 ] ) ); /*12*/ printf( "Ints are %u bytes\n\n", sizeof( int ) ); /*13*/ PrintSize( A ); /*14*/ return 0; /*15*/ }