fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. printf( "void* %lu\n", sizeof( void * ) );
  6. printf( "char %lu\n", sizeof( char ) );
  7. printf( "signed char %lu\n", sizeof( signed char ) );
  8. printf( "unsigned char %lu\n", sizeof( unsigned char ) );
  9. printf( "short int %lu\n", sizeof( short int ) );
  10. printf( "unsigned short int %lu\n", sizeof( unsigned short int ) );
  11. printf( "int %lu\n", sizeof( int ) );
  12. printf( "unsigned int %lu\n", sizeof( unsigned int ) );
  13. printf( "float %lu\n", sizeof( float ) );
  14. printf( "double %lu\n", sizeof( double ) );
  15. printf( "long int %lu\n", sizeof( long ) );
  16. printf( "unsigned long int %lu\n", sizeof( unsigned long int ) );
  17. printf( "long long int %lu\n", sizeof( long long int ) );
  18. printf( "unsigned long long int %lu\n", sizeof( unsigned long long int ) );
  19. printf( "long double %lu\n", sizeof( long double ) );
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 1788KB
stdin
Standard input is empty
stdout
void*                   4
char                    1
signed char             1
unsigned char           1
short int               2
unsigned short int      2
int                     4
unsigned int            4
float                   4
double                  8
long int                4
unsigned long int       4
long long int           8
unsigned long long int  8
long double             12