#include <stdio.h>
int main()
{
char ch = 'a';
int n = 893;
printf("Size of variable ch = %zu byte\n", sizeof(ch));
printf("Size of variable n = %zu bytes\n", sizeof(n));
printf("Size of char = %zu bytes\n", sizeof(char));
printf("Size of short = %zu bytes\n", sizeof(short));
printf("Size of int = %zu bytes\n", sizeof(int));
printf("Size of long = %zu bytes\n", sizeof(long));
printf("Size of float = %zu bytes\n", sizeof(float));
printf("Size of double = %zu bytes\n", sizeof(double));
printf("Size of long double = %zu bytes\n", sizeof(long double));
printf("Size of void = %zu bytes\n", sizeof(void));
return 0;
}
/*
run:
Size of variable ch = 1 byte
Size of variable n = 4 bytes
Size of char = 1 bytes
Size of short = 2 bytes
Size of int = 4 bytes
Size of long = 8 bytes
Size of float = 4 bytes
Size of double = 8 bytes
Size of long double = 16 bytes
Size of void = 1 bytes
*/