Answers for "C Variable Byte Sizes"

C
-1

C Variable Byte Sizes

#include <stdio.h>

int main(void) {
  printf("char size: %lu bytesn", sizeof(char));
  printf("int size: %lu bytesn", sizeof(int));
  printf("short size: %lu bytesn", sizeof(short));
  printf("long size: %lu bytesn", sizeof(long));
  printf("float size: %lu bytesn", sizeof(float));
  printf("double size: %lu bytesn", 
    sizeof(double));
  printf("long double size: %lu bytesn", 
    sizeof(long double));
}
Posted by: Guest on February-15-2022

Code answers related to "C"

Browse Popular Code Answers by Language