Code for Program to print size of int, float and double using sizeof() in C Programming
#include<stdio.h>
#include<conio.h>
int main()
{
clrscr();
printf("Size of int is -> %d\n",sizeof(int));
printf("Size of long is -> %d\n",sizeof(float));
printf("Size of double is -> %d\n",sizeof(double));
getch();
return 0;
}
Output:
Size of intis -> 2
Size of longis -> 4
Size of doubleis -> 8