This is a simple program to find the size of different basic data types in C Programming Language. I have added only four data types you can add more if you wish.
THE OUTPUT WILL BE LIKE THIS:
#include <stdio.h>
#include <malloc.h>
main()
{
int i;
printf("Size of an Integer \t=\t %d (Bytes)\n",sizeof(int));
printf("Size of a Character \t=\t %d (Bytes)\n",sizeof(char));
printf("Size of a Float \t=\t %d (Bytes)\n",sizeof(float));
printf("Size of a Double \t=\t %d (Bytes)\n",sizeof(double));
}
THE OUTPUT WILL BE LIKE THIS: