// program to find
the size of all data types
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("\n The number of bytes int takes
is %d", sizeof(int));
printf("\n The number of bytes float
takes is %d", sizeof(float));
printf("\n The number of bytes double
take is%d",sizeof(double));
printf("\n The size of bytes char takes
is %d",sizeof(char));
printf("\n The size of bytes long takes
is %d",sizeof(long));
printf("\n----------------");
getch();
}
Output:
The number of bytes int takes
is 2
The number of bytes float takes
is 4
The number of bytes double takes
is 8
The number of bytes char takes
is 1
The number of bytes long takes
is 4
____________________________
