Showsize
From Federal Burro of Information
a c program to tell you what the size of data types are:
showsize.c
#include <sys/types.h> #include <stdio.h> int main(void) { printf("In bits:\n"); printf("%d <-unsigned long\n", sizeof(unsigned long)*8); /* mul8 to get it in bits */ printf("%d <-unsigned long\n", sizeof(unsigned long)); /* mul8 to get it in bits */ printf("%d <-long long\n", sizeof(long long)*8); /* mul8 to get it in bits */ printf("%d <-int\n", sizeof(int)*8); /* mul8 to get it in bits */ printf("%d <-unsigned int\n", sizeof(unsigned int)*8); /* mul8 to get it in bits */ printf("%d <-unsigned int\n", sizeof(unsigned int)*8); /* mul8 to get it in bits */ return 0; }
Some errors need work on this. It used to work around the 2000s but now in 2023 not so much.