cours_progra/bac2/os/chap0/ex5.c

23 lines
521 B
C
Raw Normal View History

2023-09-20 15:18:20 +02:00
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
void print_type_stats();
int main(int argc, char *argv[])
{
print_type_stats();
return 0;
}
void print_type_stats(){
printf("int -> %.f\n", pow(2, (sizeof(int) * 8)));
printf("uint -> %.f\n", pow(2, (sizeof(unsigned int) * 8)));
printf("short -> %.f\n", pow(2, (sizeof(short) * 8)));
printf("long -> %.f\n", pow(2, (sizeof(long) * 8)));
printf("float -> %.f\n", pow(2, (sizeof(float) * 8)));
printf("double -> %.f\n", pow(2, (sizeof(double) * 8)));
}