Sizeof operator with datatypes

  1. #include<stdio.h>  
  2. #include<conio.h>  
  3. void main(){  
  4. clrscr();  
  5. printf("\nDetails of the Datatypes..");  
  6. printf("\nsize of char=\t\t%d byte",sizeof(char));  
  7. printf("\nsize of short=\t\t%d byte",sizeof(short));  
  8. printf("\nsize of int=\t\t%d byte",sizeof(int));  
  9. printf("\nsize of float=\t\t%d byte",sizeof(float));  
  10. printf("\nsize of long=\t\t%d byte",sizeof(long));  
  11. printf("\nsize of double=\t\t%d byte",sizeof(double));  
  12. printf("\nsize of long double=\t\t%d byte",sizeof(long double));  
  13. getch();  
  14. }