cours_progra/bac2/os/chap0/ex5.c
Debucquoy 4fd7542f03
.
2023-09-20 15:18:20 +02:00

23 lines
521 B
C

#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)));
}