/* display sizes of variables and addresses of objects */


int external_int;

int external_function(void) {

int main(void) {

	int internal_int;
	int *internal_int_ptr;

	internal_int_ptr = (int *) malloc(16384 * sizeof(int));

	(void) printf("sizeof char                  : %i\n", sizeof(char));
	(void) printf("sizeof short                 : %i\n", sizeof(short));
	(void) printf("sizeof int                   : %i\n", sizeof(int));
	(void) printf("sizeof long                  : %i\n", sizeof(long));
	(void) printf("sizeof long long             : %i\n", sizeof(long long));
	(void) printf("\n");
	(void) printf("sizeof float                 : %i\n", sizeof(float));
	(void) printf("sizeof double                : %i\n", sizeof(double));
	(void) printf("sizeof long double           : %i\n", sizeof(long double));
	(void) printf("\n");
	(void) printf("sizeof *                     : %i\n", sizeof(void *));
	(void) printf("\n");
	(void) printf("address of external_int      : %.16lx\n", &external_int);
	(void) printf("address of external_function : %.16lx\n", external_function);
	(void) printf("address of printf            : %.16lx\n", printf);
	(void) printf("address of main              : %.16lx\n", main);
	(void) printf("address of malloc            : %.16lx\n", malloc);
	(void) printf("address of internal_int      : %.16lx\n", &internal_int);
	(void) printf("address of internal_int_ptr  : %.16lx\n", &internal_int_ptr);
	(void) printf("address of malloc'ed area    : %.16lx\n", internal_int_ptr);
	(void) printf("value of -1                  : %.16lx\n", -1);