Newer
Older
src / c / c-tutorial / sizeof.c
#include <stdio.h>

int main() {
	printf("char		= %d Byte\n", sizeof(char));
	printf("int		= %d Byte\n", sizeof(int));
	printf("long		= %d Byte\n", sizeof(long int));
	printf("float		= %d Byte\n", sizeof(float));
	printf("double		= %d Byte\n", sizeof(double));
	printf("66		= %d Byte\n", sizeof(66));
	printf("Hallo		= %d Byte\n", sizeof("Hallo"));
	printf("A		= %d Byte\n", sizeof((char)'A'));
	printf("34343434	= %d Byte\n", sizeof(34343434));

	return 0;
}