C Program to calculate size of Integer, Float, Character and Double
#include <stdio.h>
int main()
{
int a;
float b;
double c;
char d;
printf("Size of integer: %d bytes\n",sizeof(a));
printf("Size of float: %d bytes\n",sizeof(b));
printf("Size of double: %d bytes\n",sizeof(c));
printf("Size of character: %d byte\n",sizeof(d));
return 0;
}
#include <stdio.h>
int main()
{
int a;
float b;
double c;
char d;
printf("Size of integer: %d bytes\n",sizeof(a));
printf("Size of float: %d bytes\n",sizeof(b));
printf("Size of double: %d bytes\n",sizeof(c));
printf("Size of character: %d byte\n",sizeof(d));
return 0;
}