/* いろいろな式の大きさを表示するプログラム */
#include <stdio.h>

int main(void)
{
	short i = 10, j = 100, *p1 = &i; 
	int a[100], *p2 = a;
	double x[10], *p3 = x;

	printf("aの要素数 = %d\n", sizeof(a) / sizeof(a[0]));
	printf("xの要素数 = %d\n", sizeof(x) / sizeof(x[0]));

	printf("short *   = %d\n", sizeof(p1));
	printf("int *     = %d\n", sizeof(p2));
	printf("double *  = %d\n", sizeof(p3));

	printf("1         = %d\n", sizeof(1));
	printf("1.0       = %d\n", sizeof(1.0));

	printf("computer  = %d\n", sizeof("computer"));

	printf("i + j     = %d\n", sizeof(i + j));

	return 0;
}
