fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int intType;
  5. float floatType;
  6. double doubleType;
  7. char charType;
  8. // sizeof evaluates the size of a variable
  9. printf("Size of int %d bytes\n",sizeof(intType)) ;
  10. printf("Size of float %lf bytes\n",sizeof(floatType)) ;
  11. printf("Size of double %lf bytes\n",sizeof(doubleType)) ;
  12. printf("Size of char %c bytes\n",sizeof(charType)) ;
  13. return 0;
  14. }
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
Size of int 4 bytes
Size of float 0.000000 bytes
Size of double 0.000000 bytes
Size of char  bytes